Class PatternPaint

java.lang.Object
org.apache.batik.gvt.PatternPaint
All Implemented Interfaces:
Paint, Transparency

public class PatternPaint extends Object implements Paint
The PatternPaint class provides a way to fill a Shape with a a pattern defined as a GVT Tree.
Version:
$Id: PatternPaint.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

    • node

      private GraphicsNode node
      The GraphicsNode that this Paint uses to produce the pixel pattern
    • patternRegion

      private Rectangle2D patternRegion
      The region to which this paint is constrained
    • patternTransform

      private AffineTransform patternTransform
      Additional pattern transform, added on top of the user space to device space transform (i.e., before the tiling space
    • tile

      private Filter tile
    • overflow

      private boolean overflow
      Controls whether or not the pattern overflows the pattern tile
    • lastContext

      private PatternPaintContext lastContext
  • Constructor Details

    • PatternPaint

      public PatternPaint(GraphicsNode node, Rectangle2D patternRegion, boolean overflow, AffineTransform patternTransform)
      Constructs a new PatternPaint.
      Parameters:
      node - Used to generate the paint pixel pattern
      patternRegion - Region to which this paint is constrained
      overflow - controls whether or not the node can overflow the patternRegion.
      patternTransform - additional transform added on top of the user space to device space transform.
  • Method Details

    • getGraphicsNode

      public GraphicsNode getGraphicsNode()
      Returns the graphics node that define the pattern.
    • getPatternRect

      public Rectangle2D getPatternRect()
      Returns the pattern region.
    • getPatternTransform

      public AffineTransform getPatternTransform()
      Returns the additional transform of the pattern paint.
    • getOverflow

      public boolean getOverflow()
    • createContext

      public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
      Creates and returns a context used to generate the pattern.
      Specified by:
      createContext in interface Paint
    • getTransparency

      public int getTransparency()
      Returns the transparency mode for this pattern paint.
      Specified by:
      getTransparency in interface Transparency