Say I have a document at 800x600.  I dynamically resize the document to 640x480.  What the JSVGCanvas does is pretty much “clip” anything that is outside the document’s size.  I imagine that’s part of the SVG spec; if my width/height attributes of the document are 640x480 and I draw something at (800,512), I wouldn’t want it to be shown.

 

What I’d like to do is when I resize a document in my application, I’d like to scale the whole thing.  Assuming a constant scaling of X and Y, (no stretching or skewing; I plan to preserve the aspect ratio), how I can I apply a transform to all my SVG elements to conform to the new sizes.  This is similar to my zoom problem except it’s an actual resize.

 

Michael Bishop

Reply via email to