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:[EMAIL PROTECTED] > Sent: Wednesday, October 31, 2007 12:44 PM > To: [email protected] > 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: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
