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 Torsten Knodt <to...@datas-world.de> on 2002/08/07 14:57:07 UTC
[Q] Generating image maps out of a-tags
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
currently I'm trying to generate image maps (for html) out of a-tags of svg's.
Has someone already tried to do this? Or does someone know a way to get the
real coordinates (which went through all transformations and friends) of
objects via ecmascript/ javascript? I could also do it with an own
transcoder, if someone can give me a hint, from where I could get the
coordiantes.
With kind regards
Torsten Knodt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9URkkvxZktkzSmiwRAk3fAJ4jgUhv8BGLrDHOx0+gp4kWHquCiACgkAtU
r8JpE+5G0eGd1rP0xloaiww=
=63ov
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: [Q] Generating image maps out of a-tags
Posted by Torsten Knodt <to...@datas-world.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Thomas,
first thanks for your answer.
> 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.
So java, not the problem. ;)
> 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.
I think this is the way I will go. I think I ask further questions for this in
batik-dev, where I think it belongs more. Thanks for all.
> Personally I say why bother just use SVG :)
Because then, you have to install plugins. I'm always creating pages, which
offer to use all, but don't depend on. For SVG you need a plugin. For normal
images with image maps, you don't need one.
With kind regards
Torsten Knodt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9WQm3vxZktkzSmiwRAmnuAJ0cSDi0GAoHW/KjaJjjLUfRzoxQzQCgly5c
DLr/mKVkz2K6LkbS3Fmzv6A=
=goR/
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
[Q] Generating image maps out of a-tags
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "TK" == Torsten Knodt <to...@datas-world.de> writes:
TK> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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