At 12:07 17/03/2002 +0100, you wrote: > > I've got a Document created from a JSVGCanvas and I want to call > > BridgeContext.getBridge() on a specific element. > > Where can I retrieve a BridgeContext? I see nothing in Document, > > JSVGCanvas > > or GVTTreeBuilder to access their own bridgeContext. > > > > Any help appreciated > >Well, can you tell me a bit more about why you need the BridgeContext. >Depending on the use case, we might add a getBridgeContext method on the >canvas.
The basic idea is to read an SVG file, retrieve a specific paint element (through a known id), transform it to a java.awt.Paint object and apply it to a pure java Shape. The BridgeContext is needed to convert the SVG paint element to the pure Java paint object via the batik.bridge.PaintServer.convertFillPaint() method. >Then, the good news for today is that all members of the JSVGCanvas and its >superclasses are protected so, right now, it's easy to subclass the >JSVGCanvas to get access to its BridgeContext and add the getBridgeContext >method you need. I saw that. I'm currently using JSVGCanvas because it's really convenient but as the SVG file I use is not meant to be rendered (it is just kindof a description file), I'll try to use something else more straightforward. If this is the only way to get a bridgeContext, I'm ok to subclass the JSVGCanvas for now. Philippe --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]