You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Leech, Jonathan" <jl...@virtela.net> on 2007/08/31 01:28:24 UTC
TexturePaint idea
Hello,
The issue I'm trying to solve is that of generating high-quality, vector
textures for SVG output when rendering Java2D->Batik.
For example, when rendering a JFreeChart to SVG using Batik, I would
like to fill chart areas(bars, pie slices etc.) using vector patterns
instead of raster patterns. The java TexturePaint class is of course
raster based.
My idea is as follows, and I'm posting it here to see if something like
this exists already, or if others are interested in it, or have
suggestions.
- Derive an SVGTexturePaint class from java.awt.TexturePaint to bridge
the raster / vector gap. It will take an SVG document in its constructor
and rasterize it as a TexturePaint. It will also hold on to the original
SVG for making a <pattern> later.
- Write an ExtensionHandler to handle the SVGTexturePaint. When it
encounters it, instead of using the raster TexturePaint, output instead
a <pattern> containing the SVG artwork.
Thoughts?
Sincerely,
Jonathan Leech
Virtela Communications
Re: TexturePaint idea
Posted by th...@kodak.com.
Hi Jonathan,
"Leech, Jonathan" <jl...@virtela.net> wrote on 08/30/2007 07:28:24 PM:
> My idea is as follows, and I'm posting it here to see if something
> like this exists already, or if others are interested in it, or have
> suggestions.
> - Derive an SVGTexturePaint class from java.awt.TexturePaint to
> bridge the raster / vector gap. It will take an SVG document in its
> constructor and rasterize it as a TexturePaint. It will also hold on
> to the original SVG for making a <pattern> later.
> - Write an ExtensionHandler to handle the SVGTexturePaint. When it
> encounters it, instead of using the raster TexturePaint, output
> instead a <pattern> containing the SVG artwork.
This will work. We actually already have a good PatternPaint
class (in the package batik.gvt) that we use to render SVG Patterns.
It's probably more general and hence a little harder to use but adding
support to the SVGGraphics2D for that would be my first suggestion.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org