Scale an image from an absolute point

Alejandro Tejada capellan2000 at yahoo.com
Sat Jul 23 21:18:15 EDT 2005


on Sat, 23 Jul 2005
Roger.E.Eller at sealedair.com
wrote:

> I need to scale an image from an absolute point
> within the image rect. 
> This point will not be the loc or any of the 4
> corners. The image must 
> stay positioned (locked) by a point where the user
> clicks during the 
> scaling routine. Does anyone have an idea of how to
> best approach this? I 
> could calculate the offset from the loc of the
> image, but this changes as 
> the image is dragged to be larger/smaller. Any
> ideas?

Hi Roger,

Could you use a vector graphic to show the scale
of the image as it resizes?
In this way, when the user stop resizing the graphic, 
set the rectangle of the image to the rect of the
graphic.

or...

Do you had to show in real time the image change
in size, as the user resizes the image?

The stack "penToolv32c" have code to
resize a vector graphic from a point
the user clicked. It is in the stack 
with the Transformation tools: scale,
rotate, skew and flip. Notice, this code
uses matrices for resize calculations.

You could download it from:

<http://geocities.com/capellan2000/penToolv032c.zip>

Have a nice weekend.

al


Visit my site:
http://www.geocities.com/capellan2000/


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



More information about the use-livecode mailing list