xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject [Q] Generating image maps out of a-tags
Date Mon, 12 Aug 2002 13:20:00 GMT
>>>>> "TK" == Torsten Knodt <torstenknodt@datas-world.de> writes:


TK> Hello, currently I'm trying to generate image maps (for html) out
TK> of a-tags of svg's.  Has someone already tried to do this? Or does
TK> someone know a way to get the real coordinates (which went through
TK> all transformations and friends) of objects via ecmascript/
TK> javascript? I could also do it with an own transcoder, if someone
TK> can give me a hint, from where I could get the coordiantes.

    You can transform a point from any element's coordinate system to
the root SVG element's coordinate system with 'getCTM'.  However I
don't think Batik implements the path iterator stuff yet do getting
the coordinates for paths may be difficult.

    If you wanted to work in Java, the GraphicsNode class (the nodes
in our rendering tree) all implement getOutline which is the outline
of that node and all it's children nodes (disregarding stroking).  You
could then get a flattening iterator to turn that into a polygon for
use in an image map.  

    Personally I say why bother just use SVG :)

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

View raw message