xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Custom Scaling
Date Tue, 06 Nov 2007 11:38:31 GMT
Hi Joshua,

"Joshua Nibecker" <joshuanibecker@gmail.com> wrote on 10/31/2007 12:44:30 

> 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.

   The easiest way to accomplish this would be to replace the
current StrokeShapePainter with one that transforms the shape
to the screen and then strokes it in screen space.

> 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.

   Actually the tricky bit will be inserting your bridge since
this really isn't well supported by the current PaintServer
class.  Actually without changing the code I don't see a
simple way to do this (the only 'clean' way would be to replace
all the basic shape bridges with your own versions that just
override the 'createShapePainter' method).

View raw message