xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tonny Kohar <to...@kiyut.com>
Subject RE: Acccessing pixels in an <image>
Date Wed, 03 May 2006 02:33:32 GMT

On Tue, 2006-05-02 at 14:46 -0400, Philip Feldman wrote:
> Sometimes ya just gotta touch pixels... This is for a panel that is
> displaying a "high level view" of a large system - something on the
> order of 100,000 - 200,000 points. It's far easier to put an image in
> the display than to draw things directly. Think of it as a streaming
> texture map.
> Anyway, I'm wondering where you get the BridgeContext. Do I create a new
> UserAgent and then a new BridgeContext? Or access the (protected)
> JSVGCanvas.CanvasUserAgent somehow? Or is there an accesable
> BridgeContext I can use directly?

As Thomas said it is better if you could just use SVG DOM API to manipulate the image, however
depending on your need, you may also subclass JSVGCanvas and override paintComponent(). You
may also get the image (BufferedImage) which is drawn to the canvas, see org.apache.batik.swing.gvt.AbstractJGVTComponent.paintComponent(Graphics)

Please be aware that the image might change whenever the gvt tree is rebuilded by Batik.

Tonny Kohar
SVG Graphics Editor

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

View raw message