[REBOL] Re: impossible figure
From: anton:lexicon at: 5-Sep-2002 2:57
Show us your code.
Or - just take my code, then cut out pieces
one by one until it stops working, then
add the last piece in again, and repeat.
Eventually, you will be left with the
minimum required to get it working.
You know the score. :)
Or - see the top of the demo code;
It uses a function 'include, which is in a
separate file (which I use a lot),
to include the trapezoid-morph function,
which is in another file.
Only after it has been included can you use
the trapezoid-morph function.
Details details... The user doesn't care,
shouldn't care, but man, how else can I
fight the beast of complexity, a creature
I fight every day in my dreams?
You don't have to answer that.
Here are some snippets of code that may help you.
You need at least this:
do load-thru site/library/include.r
; (now you can use vertical-trapezoid)
Load an image, or create it from text:
img: to-image layout [origin 0 backdrop black h1 "hello" white]
You could use my trim-image function to crop away all
the blank borders around the image, so the edges
if none? do load-thru site/library/:file [
view layout [h3 "Couldn't load-thru" h4 to-string site/library/:file]
img: trim-image img
Oops, I just noticed vertical-trapezoid does a
which just goes to show how beta it is.
Anyway, let us do what it expects for now:
view layout [
image img ; original image
button "draw" [
vertical-trapezoid img none 2x2 40 120x10 80
pic: image img