You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Hervé Girod <he...@club-internet.fr> on 2004/09/10 01:53:19 UTC

Re: RFE in svggen

Thomas DeWeese wrote:

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

>    Why don't you make the changes and check?  Then if it works well
> you could submit the changes as a patch ;)

Here is the zip file containing the patches for this RFE, I made very few
modifications (mostly transformations from private to protected for some
methods), to the following classes :
- AbstractGraphics2D in org.apache.batik.ext.awt.g2d
- DOMTreeManager, DOMGroupManager, SVGGraphics2D in org.apache.batik.svggen

I rebuilt the whole Batik jars after this change, and after subclassing
SVGGraphics2D, DOMTreeManager, and DOMGroupManager in my client application,
I was able to control the structure of the generated SVG Tree.

As you requested, I provided in SVGGraphics2D a protected setter for
DOMGroupManager and DOMTreeManager.
Hope it is the good patch format (diff -u), as I'm not a cvs guru at all. In
fact, I had much more problem in generating the patch files than for all the
rest ;)

Hervé Girod


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