Robert Casties wrote:

First of all, thanks to the Batik people and Torsten Knodt for Batik in general and the experimental image map transcoder in special! I had already been wracking my mind about how to get HTML image maps out of Batik when I found Torstens patch in his mail from 2 September 2002. (http://koala.ilog.fr/batik/mlists/batik-dev/archives/msg03068.html)

I didn't even realize someone had gotten this far (wonder what I was doing in September of 2002? :).

It works quite nicely, only it seems not to track transformations.

Yah, it looks like the basic approach would have significant problems doing this. The biggest issue is the 'piecemeal' building of the tree:

class PathGenerator:
   for (PathIterator path = builder.build (ctx,e).getOutline()[...]

If the code built the rendering tree all up front
as if it were doing dynamic rendering and then walked
the document (see what the other transcoders do when
'onload' events are active):

GraphicsNode gn = BridgeContext.getGraphicsNode(e);
    gn.getOutline();

You could then use gn.getGlobalTransform() to transform the
outline to the global coordinate system instead of the local
coordinate system.

Shape gShape = gn.getGlobalTransform().createTransformedShape(gn.getOutline());


From this SVG file (http://pythia.mpiwg-berlin.mpg.de/toolserver/digilib-tools/test/collosseo.svg) I only get areas with coordinates 1 and 0 exclusively. These are rounded int values from the coordinates in the SVG without the scale transformation.

Batik renders the same nicely into a PNG (http://nausikaa2.rz-berlin.mpg.de:18080/digitallibrary/servlet/Raster?fn=/experimental/digilib-test/test_2003/svg/collosseo.svg&dw=892&dh=604)


Is there anything special I have to look out for? (I can provide the code I used.)


Is anybody still working on this or are there better ways to create image maps from SVG these days?

Thanks
    Robert


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to