Hi Peter,

Peter Wagener <[EMAIL PROTECTED]> wrote on 03/05/2006 01:39:11 
PM:

> >    Just a comment, it would be much better to have the build up
> > SVG file reference the PNG file as a separate file rather than
> > encoding the File as Base64 and embedding.
> 
> Because of the memory requirements to not have that PNG floating 
> around as a String?  That makes sense. 

    Well also just the time to encode/decode the whole PNG as
base64.  Also there will be a couple of copies of the base64
string in the App (one in the DOM one in the ParseURL, etc).

> 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).

> >> Also, I've noticed I'm not able to attach event listeners to image
> >> elements in the same way I was with SVG elements.  Is there a
> >> difference in how those should be treated?
> >
> >    No.  Event listeners should work just the same on an image element
> > as on anything else.
> 
> I'm not sure if I broke it or not... I don't think so :)  What 
> confuses me is I have two very similar situations, except one is 
> using an <svg> node and the other is using an <image>.

> 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).


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

Reply via email to