Hello !
 
I'm using Batik to convert other (older or proprietary) vector graphic format in SVG. I'm using the svggen package for that, because then I only need to now the format => Java conversion, and by creating a new transcoder, this is made very simple with Batik.
 
My problem is that it is not possible to control the SVG Tree by using SVGGraphics2D. I am now able to do it, but in order to do it, I had to create a new SVGGraphics2D class, rather than subclassing it, because of some private fields and methods.
 
Would it be possible to make some of these methods and fields protected, it would ease the process of controlling the generated SVG Tree.
 
What would be necessary is :
in org.apache.batik.svggen: SVGGraphics2D
   - make domGroupManager, domTreeManager, and generatorCtx protected, or provide setters for them
 
in org.apache.batik.svggen: DOMGroupManager
  - make currentGroup and domTreeManager protected instead of private
  - make setTransform protected instead of private
 
in org.apache.batik.svggen: DOMTreeManager
- make groupManagers and topLevelGroup protected instead of private
I think these modifications would be sufficiant to be able to be able to control the SVG Tree building without creating an entirely new class.
 
Another enhancement in svggen would be great too :
in org.apache.batik.svggen: SVGGraphics2D
- allow to set a custom XMLWriter (in some cases I encountered with exotic Unicode Strings, the actual failed to provide a proper conversion)
 
in org.apache.batik.svggen: XMLWriter
- make this class protected in order to be able to extend it
 
And it would be great too if the  SVGShape class could manage Java arcs without automatically converting them to Curves. It could be done by providing a new SVGArc class...
 
Thanks for reading, (and thanks for this great API !!)
 
Hervé Girod
 
 

Reply via email to