xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Wagener <peter.wage...@hypoluxo.com>
Subject Re: Combining SVG documents?
Date Mon, 06 Mar 2006 21:05:44 GMT
Hi Thomas,

On Mar 5, 2006, at 3:34 PM, thomas.deweese@kodak.com 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.


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

View raw message