Magnifier (script!)
Sannyasin Sivakatirswami
katir at hindu.org
Mon Jul 21 16:45:01 EDT 2003
And, this is actually the proper way to do this, a bit more "esoteric"
but the resize occurs only once instead of twice... a tad faster.
local tSizeChange
on mouseup
if optionkey()="Down" then
put (-10) into tSizeChange
changeSize
exit mouseup
end if
put (+10) into tSizeChange
changeSize
end mouseup
on changeSize
put (the height of the target/the width of the target) into tRatio
put the rect of the target into tImageRect
put (item 3 of tImageRect+tSizeChange) into item 3 of tImageRect
put (((item 3 of tImageRect-item 1 of tImageRect)* tRatio)\
+item 2 of tImageRect) into item 4 of tImageRect
set the rect of the target to tImageRect
end changeSize
On Monday, July 21, 2003, at 06:17 AM, Ken Norris wrote:
> Hi Yves
>> Date: Mon, 21 Jul 2003 09:51:20 +0200
>> Subject: Re: Magnifier (script!)
>> From: Yves COPPE <yvescoppe at skynet.be>
>
>> I'd like that the RECT of the target stays at "30,20,330,220" with
>> the
>> zoomed image in that rect.
> ----------
> OK, try this:
>
> 1) Make a substack the size and position you want and uncheck its
> resizeable
> or set its resizeable() to false.
>
> 2) Set its decorations to empty.
>
> 3) Import the image you want.
>
> 4) Put Sannyasin's script into the image script and DELETE the last
> body
> line ("set the loc of the target to the mouseloc") from it.
>
> Tested; works.
>
> Of course it's expected for you to set it up your own way. For
> example, I'd
> have a "Zoom" menu with "increase" and "reduce" and use [cmd/+] for
> increasing zoom and [cmd/-] to reduce it, and I'd set min/max limits.
> Things
> like that.
>
> HTH,
> Ken N.
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list