set borderWidth spoils images

Richmond Mathewson geradamas at yahoo.com
Fri Mar 6 15:38:14 EST 2009


Here is a silly little script I have been playing with:

on mouseUp
  set the vis of btn "Button 1" to false
  create img "BOX"
  put the windowID of this stack into WINDY
  put the rect of card "KARD" into HANDY
  export snapshot from rect HANDY of window WINDY to img "BOX" as PNG
put the width of card "KARD" into WIDD
  put the height of card "KARD" into HITE
set the width of img "BOX" to (WIDD / 2)
set the height of img "BOX" to (HITE / 2)
--set the borderWidth of img "BOX" to 4
--set the borderColor of img "BOX" to "green"
put the bottomRight of card "KARD" into BRITE
set the bottomRight of img "BOX" to BRITE
 set the vis of btn "Button 1" to true
end mouseUp

And, as it stands, it works beautifully, producing a quarter-size
screen shot of the stack window in the lower right-hand corner of the
stack.

However, when I remove the comments from these two lines:

set the borderWidth of img "BOX" to 4
set the borderColor of img "BOX" to "green"

I get an image, "BOX", with the top-left 25% of the screen shot, at
full size, and no green border.

Funny, that . . .

sincerely, Richmond Mathewson.
____________________________________________________________

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


      



More information about the use-livecode mailing list