three problems when manipulating graphics
kray at sonsothunder.com
Tue Oct 15 10:12:01 CDT 2002
> 1°) I'm surprising to see that coordinates of pixels on a card begin at
> -3, -25 (top left) and end approximatively at 600,400 (bottom,right) in
> a stack defined with 600 * 400 window.
They shouldn't... are you sure you're checking the card and not the stack?
If the stack window is at 3,25 and you ask for the rect of the stack, you'll
get "3,25,603,425" for a 600x400 window, but if you ask for the rect of the
card, you'll get "0,0,600,400".
Note also that the mouseLoc is in relation to the card rect, so if the mouse
is in the upper-left corner of the card and you ask for the mouseLoc, you'll
> 2°) i would like to use instruction like "click at 200,300" with bucket
> tool in several part of a graphic to make these parts dark. Sometimes,
> Results are wrong (that's not the expected part that become dark) as if
> coordinates of the "clicked" point were false nevertheless I determine
> these coordinates using the mouseloc() function and spell them in global
> variables (set to empty between two selection)
Not sure about this, but it might be relative to the card/stack locations
mentioned in #1 above.
> 3°) in the scrip below (that replace working image by the original), the
> instruction "choose browse tool" don't work properly. When i move the
> cursor out of the button that command this script, the select tool
> replace immediately the browse tool.
> on mouseUp
> lock Screen
> select card image "Schema.png" of cd "SCINTI QUANTIF1"
> import paint from file "/Disque X/Revolution 1.1.1/Schema.png"
> set the layer of card image "Schema.png" to bottom
> set the opaque of cd image "Schema.png" to false
> unlock Screen
> choose browse tool
> end mouseUp
This may be the Rev UI getting in the way. Did you do a "Suspend Revolution
UI" before you did this? If not, you might want to try again with that
turned on (or set the lockMessages to true in your mouseUp handler).
Hope this helps,
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode