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 philip zuniga <ph...@yahoo.com> on 2006/05/06 08:37:59 UTC

Zooming only in one direction

Hello guys,

I am currently working on an java application where I
would need to zoom in and zoom out an SVG file, but
the twist is that I should perform zooming in just one
direction. Meaning, I should be able to perform
horizontal zooming, while keeping the vertical height
of the image constant.

I am using JSVG canvas to load my SVG file.


Thanks,


PhilipZ

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Zooming only in one direction

Posted by th...@kodak.com.
Hi Philip,

philip zuniga <ph...@yahoo.com> wrote on 05/06/2006 02:37:59 AM:

> I am currently working on an java application where I
> would need to zoom in and zoom out an SVG file, but
> the twist is that I should perform zooming in just one
> direction. Meaning, I should be able to perform
> horizontal zooming, while keeping the vertical height
> of the image constant.

   You can do this by using a non-uniform scale for the
renderingTransform.  There are many ways to adjust this
all the 'directly' provided means use uniform scale, but
most can be fairly easily modified to do a non-uniform
scale.

   In particular the JSVGCanvas.ZoomAction has a
constructor that takes separate x/y scales.  You
will have to replace the normal entries for zoom-in
out in the swing component of course.

> I am using JSVG canvas to load my SVG file.
> 
> 
> Thanks,
> 
> 
> PhilipZ
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


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