xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject RE: Getting rendered image from JSVGCanvas
Date Thu, 07 Mar 2002 13:50:15 GMT
>>>>> "KG" == K, Balamurugan (CORP, GEITC) <Balamurugan.K@geind.ge.com>

KG> 	Thanks for the suggesion thomas. Let me put my problem more
KG> clear.  I need to give an image for icons(componets).User will
KG> drag and drop the components into the panel. He may resize the
KG> icons. If i put .gif as image of an icon when user resizes it he
KG> will lose the resolution. To avaoid that i was planing to user SVG
KG> i dont want to use JSVGCanvas. I tried with class
KG> SVGRasterizer(Which will give me a bufferedImage) but still i
KG> could not get the resolution SVG. 

    If you want a BufferedImage look at the
gvt.renderer.StaticRenderer.  You give it the GraphicsNode to render,
the desired size of the resultant BufferedImage (which does not affect
the scale of the SVG) and the usr2dev transform (which _does_ affect
the scale of the SVG).  So generally if you want a larger version of
the icon you will increase the size of the Offscreen
(updateOffscreen), and construct a new AffineTransform for rendering
(setTransform, usually based on something like:

    Good luck.

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

View raw message