On Mon, 24 Sep 2001 13:20:42 Thomas E Deweese wrote:
> >>>>> "KL" == Keiron Liddle <[EMAIL PROTECTED]> writes:
>
> KL> Using the current cvs I get this class cast exception. This
> KL> happens if an image cannot be found.
>
> Hmm, I (or you for testing purposes) can easily wrap the cast in a
> try catch block which would probably make the problem go away for now
> for you (I can't reproduce the problem in my copy of Batik). I also
> really have to wonder who is setting the
> SVG_BROKEN_LINK_DOCUMENT_PROPERTY, on an image returned from the
> ImageTagRegistry, if it isn't the SVGBrokenLinkProvider which always
> sets it to an SVGDocument.
>
> This seems like a bigger issue than just the class cast problem.
> Can you provide more information on the image returned from
> reg.readURL(..) in createRasterImageNode? It's type for example, also
> printing the object that is returned from the img.getProperty(...)
> call might be useful...
The object that is return from the getProperty is just and "Object" it
doesn't have any more info than that.
After a quick look it seems there is a difference between the
SVGBrokenLinkProvider and the DefaultBrokenLinkProvider.
The Default one sets the BROKEN_LINK_PROPERTY with a message and the SVG
one sets the BROKEN_LINK_PROPERTY and the
SVG_BROKEN_LINK_DOCUMENT_PROPERTY. So presumably the BROKEN_LINK_PROPERTY
is the one used to indicate a broken link. The SVGImageElementBridge then
gets the SVG_BROKEN_LINK_DOCUMENT_PROPERTY which is not set by the Default
one (I can't see where the value is coming from, maybe it is a default).
The image is coming from line 145 in the ImageTagRegistry.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]