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 Sudhakar S <ye...@hotmail.com> on 2006/08/29 08:17:30 UTC

Getting stroke size of scaled rect element

Hi All,

I am zooming in the SVG Document to large extent. After zoomed in, how to
get the transformed/scaled "rect" element's stroke width?

Thanks,
Sudhakar
-- 
View this message in context: http://www.nabble.com/Getting-stroke-size-of-scaled-rect-element-tf2181680.html#a6033485
Sent from the Batik - Users forum at Nabble.com.


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


Re: Getting stroke size of scaled rect element

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

Sudhakar S <ye...@hotmail.com> wrote on 08/29/2006 02:17:30 AM:

> I am zooming in the SVG Document to large extent. After zoomed in, how 
to
> get the transformed/scaled "rect" element's stroke width?

   You should call getScreenCTM on the rect element.  For simple
cases 'a' member of the matrix is the scale otherwise you will need
to calculate the square root of the determinant of the matrix as an
approximation of the scale factor (you can have different scales in X
& Y).


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