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 Stephen Williams <st...@fluid-forms.com> on 2009/09/16 11:28:56 UTC

Create a new Group

I am using SVGGraphics2D to generate an SVG file. All I want to do is start
a new group and have all proceeding draw functions add to this group.
Can someone please point me in the right direction?

Re: Create a new Group

Posted by th...@kodak.com.
Hi Stephen,

Stephen Williams <st...@fluid-forms.com> wrote on 09/16/2009 
05:28:56 AM:

> I am using SVGGraphics2D to generate an SVG file. All I want to do 
> is start a new group and have all proceeding draw functions add to this 
group.
> 
> Can someone please point me in the right direction?

    You can call 'getRoot()' to get everything drawn since the
SVGGraphics2D was created, or the last time getRoot was called
(calling getRoot clears the SVGGraphics2D).