Class CanvasGraphicsNode

All Implemented Interfaces:
Iterable, Collection, List, SequencedCollection, GraphicsNode

public class CanvasGraphicsNode extends CompositeGraphicsNode
The graphics node container with a background color.
  • Field Details

    • 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.
    • backgroundPaint

      protected Paint backgroundPaint
      The background of this canvas graphics node.
  • Constructor Details

    • CanvasGraphicsNode

      public CanvasGraphicsNode()
      Constructs a new empty CanvasGraphicsNode.
  • Method Details

    • setBackgroundPaint

      public void setBackgroundPaint(Paint newBackgroundPaint)
      Sets the background paint of this canvas graphics node.
      Parameters:
      newBackgroundPaint - the new background paint
    • getBackgroundPaint

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

      public void setPositionTransform(AffineTransform at)
    • getPositionTransform

      public AffineTransform getPositionTransform()
    • setViewingTransform

      public void setViewingTransform(AffineTransform at)
    • getViewingTransform

      public AffineTransform getViewingTransform()
    • primitivePaint

      public void primitivePaint(Graphics2D g2d)
      Paints this node without applying Filter, Mask, Composite, and clip.
      Specified by:
      primitivePaint in interface GraphicsNode
      Overrides:
      primitivePaint in class CompositeGraphicsNode
      Parameters:
      g2d - the Graphics2D to use