xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: newbie question
Date Sat, 18 Mar 2006 00:54:16 GMT
Hi Andrea,

"Andrea Chiumenti" <kiuma72@gmail.com> wrote on 03/17/2006 09:07:54 AM:

> Hello I've a question about Batik that I'm using for the first time.
> When I use SVGGraphics2D and create a shape, how can I refenece it in a 
> style, using an Id and, for example, add an onclick event ?
> The site example only says :
> g2d.setPaint(Color.red);
> g2d.fill(new Rectangle(10, 10, 100, 100));
> but how could i set additional attributes?

   The short answer is that you don't.  The longer answer is that
you can get the rendered content as you go "getRoot()".  This will
clear the current contents of the graphics so you will have to
build up the full document yourself, but by doing this you can fairly
easily locate the 'just created' element (it will be the last
child of the root SVG element).

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

View raw message