Class RMFill

java.lang.Object
com.reportmill.base.RMObject
com.reportmill.graphics.RMFill
All Implemented Interfaces:
RMArchiver.Archiving, Cloneable
Direct Known Subclasses:
RMGradientFill, RMImageFill, RMStroke

public class RMFill extends RMObject
This class represents a simple shape fill, drawing a given color in a provided path. Subclasses support things like gradients, textures, drop-shadow, etc.
  • Field Details

    • DEFAULT

      public static final RMFill DEFAULT
  • Constructor Details

    • RMFill

      public RMFill()
      Creates a plain, black fill.
    • RMFill

      public RMFill(RMColor aColor)
      Creates a plain fill with the given color.
  • Method Details

    • getColor

      public RMColor getColor()
      Returns the color associated with this fill.
    • setColor

      public void setColor(RMColor aColor)
      Sets the color associated with this fill.
    • getChildCount

      public int getChildCount()
      Returns the number of child strokes if this stroke is a composite stroke.
    • getChild

      public RMFill getChild(int anIndex)
      Returns the individual child stroke at the given index for composite strokes.
    • getBounds

      public RMRect getBounds(RMShape aShape, RMRect pathBounds)
      Returns the bounds required to render this fill for this shape.
    • deriveFill

      public RMFill deriveFill(RMColor aColor)
      Returns a fill just like the receiver, but with the given color (only interesting for subsclasses).
    • paintShape

      public void paintShape(RMShape aShape, RMPath aPath, Graphics2D g2, RMShapePainter sp)
      Render this fill in a Java2D Graphics2D.
    • equals

      public boolean equals(Object anObj)
      Standard equals implementation.
      Overrides:
      equals in class Object
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
    • initWithArchiver

      public Object initWithArchiver(RMArchiver anArchiver)
      Legacy unarchival.
      Specified by:
      initWithArchiver in interface RMArchiver.Archiving
      Overrides:
      initWithArchiver in class RMObject