Package org.apache.batik.gvt
Class CanvasGraphicsNode
- java.lang.Object
-
- org.apache.batik.gvt.AbstractGraphicsNode
-
- org.apache.batik.gvt.CompositeGraphicsNode
-
- org.apache.batik.gvt.CanvasGraphicsNode
-
- All Implemented Interfaces:
java.lang.Iterable
,java.util.Collection
,java.util.List
,GraphicsNode
public class CanvasGraphicsNode extends CompositeGraphicsNode
The graphics node container with a background color.- Version:
- $Id: CanvasGraphicsNode.java 1808888 2017-09-19 14:22:11Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Paint
backgroundPaint
The background of this canvas graphics node.protected java.awt.geom.AffineTransform
positionTransform
This is the position transform for this graphics node.protected java.awt.geom.AffineTransform
viewingTransform
This is the viewing transform for this graphics node.-
Fields inherited from class org.apache.batik.gvt.CompositeGraphicsNode
backgroundEnableRgn, children, count, modCount, NULL_RECT, VIEWPORT
-
Fields inherited from class org.apache.batik.gvt.AbstractGraphicsNode
changeCompletedEvent, changeStartedEvent, clip, composite, enableBackgroundGraphicsNodeRable, EPSILON, filter, graphicsNodeRable, hints, inverseTransform, isVisible, listeners, mask, parent, pointerEventType, root, transform, weakRef
-
Fields inherited from interface org.apache.batik.gvt.GraphicsNode
ALL, FILL, IDENTITY, NONE, PAINTED, STROKE, VISIBLE, VISIBLE_FILL, VISIBLE_PAINTED, VISIBLE_STROKE
-
-
Constructor Summary
Constructors Constructor Description CanvasGraphicsNode()
Constructs a new emptyCanvasGraphicsNode
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Paint
getBackgroundPaint()
Returns the background paint of this canvas graphics node.java.awt.geom.AffineTransform
getPositionTransform()
java.awt.geom.AffineTransform
getViewingTransform()
void
primitivePaint(java.awt.Graphics2D g2d)
Paints this node without applying Filter, Mask, Composite, and clip.void
setBackgroundPaint(java.awt.Paint newBackgroundPaint)
Sets the background paint of this canvas graphics node.void
setPositionTransform(java.awt.geom.AffineTransform at)
void
setViewingTransform(java.awt.geom.AffineTransform at)
-
Methods inherited from class org.apache.batik.gvt.CompositeGraphicsNode
add, add, addAll, addAll, clear, contains, contains, containsAll, ensureCapacity, get, getBackgroundEnable, getChildren, getGeometryBounds, getOutline, getPrimitiveBounds, getSensitiveBounds, getTransformedBBox, getTransformedGeometryBounds, getTransformedPrimitiveBounds, getTransformedSensitiveBounds, indexOf, invalidateGeometryCache, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nodeHitAt, remove, remove, removeAll, retainAll, set, setBackgroundEnable, setRoot, setVisible, size, subList, toArray, toArray
-
Methods inherited from class org.apache.batik.gvt.AbstractGraphicsNode
fireGraphicsNodeChangeCompleted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, fireGraphicsNodeChangeStarted, getBounds, getClip, getComposite, getEnableBackgroundGraphicsNodeRable, getFilter, getGlobalTransform, getGraphicsNodeRable, getInverseTransform, getMask, getParent, getPointerEventType, getRenderingHints, getRoot, getTransform, getTransformedBounds, getWeakReference, intersects, isAntialiasedClip, isOffscreenBufferNeeded, isVisible, normalizeRectangle, paint, setClip, setComposite, setFilter, setMask, setParent, setPointerEventType, setRenderingHint, setRenderingHints, setRenderingHints, setTransform
-
-
-
-
Field Detail
-
positionTransform
protected java.awt.geom.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 java.awt.geom.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.
-
backgroundPaint
protected java.awt.Paint backgroundPaint
The background of this canvas graphics node.
-
-
Method Detail
-
setBackgroundPaint
public void setBackgroundPaint(java.awt.Paint newBackgroundPaint)
Sets the background paint of this canvas graphics node.- Parameters:
newBackgroundPaint
- the new background paint
-
getBackgroundPaint
public java.awt.Paint getBackgroundPaint()
Returns the background paint of this canvas graphics node.
-
setPositionTransform
public void setPositionTransform(java.awt.geom.AffineTransform at)
-
getPositionTransform
public java.awt.geom.AffineTransform getPositionTransform()
-
setViewingTransform
public void setViewingTransform(java.awt.geom.AffineTransform at)
-
getViewingTransform
public java.awt.geom.AffineTransform getViewingTransform()
-
primitivePaint
public void primitivePaint(java.awt.Graphics2D g2d)
Paints this node without applying Filter, Mask, Composite, and clip.- Specified by:
primitivePaint
in interfaceGraphicsNode
- Overrides:
primitivePaint
in classCompositeGraphicsNode
- Parameters:
g2d
- the Graphics2D to use
-
-