Chris wrote:
Thanks Tonny. Which method would you recommend? My program would allow
users to place a set of graphic symbols on screen and print them out.
Where would you suggest I look for sample code?
If you want to print I would stay away from using the BufferedImage
approach, as this will likely lead to pixelated images when printed.
I would build the GVT tree and then use the 'paint(Graphics2D)' method
on GraphicsNode to draw the SVG content to the screen/print Graphics2D.
You may want to create a BufferedImage for screen display as if
the image will be displayed multiple times this can be much faster
than rendering from the source content (for complex content).
Tonny's suggestion of looking at the slideshow app is a good
one as it does the loading and rendering in a fairly straightforward
way where as many of the other applications are dealing with
lots of side issues that don't concern you.
Thanks again,
Chris
---------------------
Subject: How to display SVG on screen using Batik
From: Tonny Kohar <[EMAIL PROTECTED]>
Content-Type: text/plain
Date: 13 Oct 2003 05:30:22 +0700
Hi,
I think there is 2 ways to achieve this
1) if you still want the ImageIO, then you need to write ImageIO reader
plugin that wrap batik basically wrap GVT renderer to produce
BufferedImage
2) not using ImageIO, then you need to utilize either JSVGCanvas or wrap
GVT renderer into you own function to produce BufferedImage
Regards
http://www.kiyut.com
---------------------------------------------------------------------
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]