xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bishop, Michael W. CONTR J9C880" <Michael.Bis...@je.jfcom.mil>
Subject RE: Custom Scaling
Date Thu, 01 Nov 2007 13:31:42 GMT
To preserve the stroke-width, I would do the following:

- Store the original stroke-width value.  (e.g. 4)
- Apply the scaling transform to the renderer.
- Retrieve the scale value of the renderer (could be tricky if rotate,
skew, or shear is involved) (e.g. 2)
- Apply the inverse of the scale value to the stroke-width 4 * (1/2) ==
2

Tricky, but I'm not sure how else you would achieve it.  If you apply a
transform to a rendering, it transforms the entire document without
changing any values.

Michael Bishop

> -----Original Message-----
> From: Joshua Nibecker [mailto:joshuanibecker@gmail.com] 
> Sent: Wednesday, October 31, 2007 12:44 PM
> To: batik-users@xmlgraphics.apache.org
> Subject: Custom Scaling
> 
> I would like to preserve stroke-width when scaling.  In other 
> words when I give the renderer a scaling transform I would 
> like the output to have the same stroke-width as before the 
> application of the transform.  I know this is very un-svg 
> like since the 's' in svg stands for scalable.  It looks like 
> I could build a bridge that will always render shapes with a 
> defined line width.  I am just not sure how to accomplish 
> this.  Any help would be most appreciated.
> 
> Regards,
> 
> Joshua
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message