Can Rev Draw a Line?

Richmond Mathewson geradamas at yahoo.com
Fri Jan 25 04:02:45 EST 2008


J. Landman Gay wrote:

"on mouseUp
   create image "boxes"
   set the rect of img "boxes" to 100,100,500,500
   choose rectangle tool
   set the brushcolor to "green"
   drag from 150,150 to 350,350
   set the brushcolor to "blue"
   drag from 300,300 to 450,450
   choose browse tool
end mouseUp"

however, for some odd reason that didn't work for me,
and I spent quite a bit of time messing around until I
got this:

create img "LLINE"
set the WIDTH of img "LLINE" to (WID2 - WID1)
set the HEIGHT of img "LLINE" to (HITE2 - HITE1)
set the TOPLEFT of img "LLINE" to WID1,HITE1
choose brush tool
   set the brushcolor to "green"
   drag from WID1,HITE1 to WID2,HITE2
choose browse tool

where WID1 is the LEFT of the image,
            WID2 is the RIGHT of the image,
            HITE1 is the TOP of the image,
and     HITE2 is the BOTTOM of the image

setting the RECT did not work at all (I ended up with
a point),
and the RECTANGLE TOOL had to be replaced by the BRUSH
TOOL

this then draws a green line diagonally across the
invisible rectangle.

For what it is worth if (WID2 - WID1) or (HITE2 -
HITE1) RunRev crashes.

sincerely, Richmond Mathewson

____________________________________________________________

A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________


      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com




More information about the use-livecode mailing list