You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Bishop, Michael W. CONTR J9C880" <Mi...@je.jfcom.mil> on 2005/10/20 22:23:51 UTC

Global rescaling?

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


Re: Global rescaling?

Posted by Tonny Kohar <to...@kiyut.com>.
Hi,

On Thu, 2005-10-20 at 16:23 -0400, Bishop, Michael W. CONTR J9C880
wrote:
> 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.

Maybe you could use viewbox attribute 0 0 640 840

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


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org