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 Thomas DeWeese <Th...@Kodak.com> on 2004/07/19 14:39:34 UTC
Re: [Design pbm]How can I Customize SVGShape
Hi Oliver,
You want to implement an extension handler:
http://xml.apache.org/batik/extendingBatik.html#customXMLTags
You might also want to look at the code in batik.extension.svg
In particular the classes:
BatikStarElement, BatikStarElementBridge, BatikDomExtension &
BatikBridgeExtension.
oliver clement wrote:
> Hello,
>
> I'm starting to play with the Graphics2D capabilities of batik.
> The API i'm working on enables objects to be serialized into XML via a
> toXML() method defined in an interface called Taggable
> and I'd like to be able to customize the way batik converts 2D objects
> to SVG in a way such as it could include my XML content into the SVG
> groups.
>
> Lets say I use a CustomRectangle defining the paint(Graphics g) method,
> associated with an a A object implementing Taggable.
> The thing i'd like to obtain would be :
>
> <g fill="lime" stroke="lime">
> <rect x="284341" width="471" y="245" height="10" stroke="none" />
> <a name="ect" attr1="value1" xmlns="myNameSpace">
> <.../>
> </a>
>
> </g>
>
> What should I do, subclass or redefine the SVGShapes, play with the
> domGroupManager or create an extensioHandler ?
>
> Any help would be greatly appreciated
>
> Thanks
>
> Oliver
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org