Hi Thomas,

On Mar 5, 2006, at 3:34 PM, [EMAIL PROTECTED] wrote:
[...]
This app will eventually be delivered with the images inside
a JAR... how  messy is it to reference the PNG image as a
URL inside a JAR file?

   It's simple, Batik is happy to decode 'jar:' protocol
URLs.  You can get one from ClassLoader.findResource(String).

Excellent; I was hoping it'd be that easy!


I then load an SVG document, add an
event listener to the SVG's element, and append it to the document.
The event listener responds correctly.  Here's the generated SVG file
(with internal elements & encoded PNG data stripped out):

[...]

The second situation is very similar: I create the same SVG document
with the initial embedded PNG image.  I then load another PNG as an
<image>, add an instance of the same event listener to the PNG's
element, then add that element to the document.  The event listener
doesn't respond at all.  Here's the generated SVG for that situation
(with the embedded PNG data stripped out):

   I suspect that there is something subtle wrong with the creation
and addition of the Listener, but I would have to see the code that
creates the second image element and adds the listener to know.
The structure of the document shouldn't really matter (unless you did
something really silly like put 'pointer-events="none"' on the
image element).

You're right -- something is odd with that code. I haven't tracked down the issue in my little test application, but the real application has similar code that is working just fine. I should be able to figure it out where I went wrong in the test app myself at some point.

Thanks again for all your help. I'd like to put together a tutorial on these topics, and use my test application as the example. Assuming I can convince my client to let me use that code, I'll package it up & let the list know when I've done a first pass at it.


Peter

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

Reply via email to