Hello,
what I did was to place everything i want to zoom inside a <g> group, and then scaled on the group. I would want to use the process suggested by Tonny, that I compute the offsets ( since the <g> is moving when I scale it, and I want it to stay at a certain place while I am scaling it). My question  is what attributes of <g> should I play with so that I could keep <g> on a certain place
 
Thanks for all your replies, they're really efficient.
 
Philip

 
On 5/15/06, Tonny Kohar <[EMAIL PROTECTED]> wrote:
Hi,

On Mon, 2006-05-15 at 12:47 +0800, philip zuniga wrote:
> Yes, they were both good suggestions. the next question is when I zoom
> the canvas, the objects that i want to remain static are not affected
> by the zooming but, they move, this is caused by the zooming of the
> canvas, but how would I offset the movement of the items?
>
> Philip

Assuming the initial transform is identity transform, just calculate the
offset using identity transform as base. eg:
- calculate the x,y of upperleft coord against initial transform
- zoom
- calculate the x,y of upperleft coord against zoom transform
- calculate the diff or offset of x,y before and after zoom

Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to