Steve Lamont wrote:

Can someone be so kind as to give me a leg up on this?  I've looked at
SVGImageElement and it's ilk but haven't the slightest clue as to how
to stuff a BufferedImage or anything similar into them.

You can't because not surprisingly SVG as a document format doesn't handle this concept. . . .

Then what's the point of the SVGImageElement object?

This is for the SVG 'image' element, which get's it's content from a URI.

                       . . . You can just stuff a buffered image
into a GVT RasterImageNode however it will have no peer in the
SVG and there are some cases where it may 'go away' because the
graphics tree is rebuilt from the SVG.

Ah. This is what I'm already doing and that's exactly the problem I'm having.

I wouldn't expect this problem for simple scale/translate. Unless you are manipulating the viewBox to scale/translate.

I'd like to either work at the SVG level or the GVT level.  GVT is
fine with me if I can figure out how to change colors of the vector
elements but that seems also to be a dead end.  Or am I again missing
some subtlety of the TextPainter object and its relatives?  There
seems to be no method to manipulate text color.

Text is quite tricky. You need to manipulate the TextPaintInfo object that is attached to the AttributedString associated with the TextNode. The tricky bit is that all of the tspan's are built into the one AttributedString so if you have 'complex' text you would have to track down the proper TextPaintInfo to update.

   The best solution I can think of for this problem would be
to create a custom element.  You could have a subclass of the
UserAgent that knows about the 'images' to display in this document.
Then your Bridge could look up the BufferedImage from the
UserImage and stick it on the RasterImageNode.  This would
allow you to manipulate stuff at the SVG level.

   There are some fairly simple examples in batik.extension.svg.
You might be able to mostly use/copy the existing SVGImage stuff
and just shortcut the URI stuff.

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



Reply via email to