org.apache.batik.gvt

Class CanvasGraphicsNode

public class CanvasGraphicsNode extends CompositeGraphicsNode

The graphics node container with a background color.
Field Summary
protected PaintbackgroundPaint
The background of this canvas graphics node.
protected AffineTransformpositionTransform
This is the position transform for this graphics node.
protected AffineTransformviewingTransform
This is the viewing transform for this graphics node.
Constructor Summary
CanvasGraphicsNode()
Constructs a new empty CanvasGraphicsNode.
Method Summary
PaintgetBackgroundPaint()
Returns the background paint of this canvas graphics node.
AffineTransformgetPositionTransform()
AffineTransformgetViewingTransform()
voidprimitivePaint(Graphics2D g2d)
Paints this node without applying Filter, Mask, Composite, and clip.
voidsetBackgroundPaint(Paint newBackgroundPaint)
Sets the background paint of this canvas graphics node.
voidsetPositionTransform(AffineTransform at)
voidsetViewingTransform(AffineTransform at)

Field Detail

backgroundPaint

protected Paint backgroundPaint
The background of this canvas graphics node.

positionTransform

protected AffineTransform positionTransform
This is the position transform for this graphics node. This is needed because getCTM returns the transform to the viewport coordinate system which is after viewing but before positioning.

viewingTransform

protected AffineTransform viewingTransform
This is the viewing transform for this graphics node. This is needed because getCTM returns the transform to the viewport coordinate system which is after viewing but before positioning.

Constructor Detail

CanvasGraphicsNode

public CanvasGraphicsNode()
Constructs a new empty CanvasGraphicsNode.

Method Detail

getBackgroundPaint

public Paint getBackgroundPaint()
Returns the background paint of this canvas graphics node.

getPositionTransform

public AffineTransform getPositionTransform()

getViewingTransform

public AffineTransform getViewingTransform()

primitivePaint

public void primitivePaint(Graphics2D g2d)
Paints this node without applying Filter, Mask, Composite, and clip.

Parameters: g2d the Graphics2D to use

setBackgroundPaint

public void setBackgroundPaint(Paint newBackgroundPaint)
Sets the background paint of this canvas graphics node.

Parameters: newBackgroundPaint the new background paint

setPositionTransform

public void setPositionTransform(AffineTransform at)

setViewingTransform

public void setViewingTransform(AffineTransform at)
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.