ReportMill 10 API

com.reportmill.graphics
Class RMStroke

java.lang.Object
  extended by com.reportmill.base.RMObject
      extended by com.reportmill.graphics.RMFill
          extended by com.reportmill.graphics.RMStroke
All Implemented Interfaces:
java.lang.Cloneable

public class RMStroke
extends RMFill

An RMFill subclass specifically desgined to describe strokes.


Field Summary
static RMStroke DEFAULT
           
 
Constructor Summary
RMStroke()
          Creates a plain, black stroke.
RMStroke(RMColor aColor, float aStrokeWidth)
          Creates a stroke with the given color and line width.
 
Method Summary
 RMStroke deriveStroke(float aWidth)
          Returns a stroke just like the receiver, except with the new given line width.
 RMStroke deriveStroke(RMColor aColor)
          Returns a stroke just like the receiver, except with the new given color.
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement)
          XML unarchival.
 RMRect getBounds(RMShape aShape, RMRect pathBounds)
          Returns the bounds required to render this fill for this shape.
 float getLineWidth()
          Returns the line width of this stroke.
 RMPath getPath(RMPath inputPath)
          Returns the path to be stroked, transformed from the input path.
 void paintShape(RMShape aShape, RMPath aPath, java.awt.Graphics2D g2, com.reportmill.shape.RMShapePainter sp)
          Render this fill in a Java2D Graphics2D.
 com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
          XML archival.
 
Methods inherited from class com.reportmill.graphics.RMFill
deriveFill, getChild, getChildCount, getColor, setColor
 
Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final RMStroke DEFAULT
Constructor Detail

RMStroke

public RMStroke()
Creates a plain, black stroke.


RMStroke

public RMStroke(RMColor aColor,
                float aStrokeWidth)
Creates a stroke with the given color and line width.

Method Detail

getLineWidth

public float getLineWidth()
Returns the line width of this stroke.


getPath

public RMPath getPath(RMPath inputPath)
Returns the path to be stroked, transformed from the input path.


getBounds

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

Overrides:
getBounds in class RMFill

paintShape

public void paintShape(RMShape aShape,
                       RMPath aPath,
                       java.awt.Graphics2D g2,
                       com.reportmill.shape.RMShapePainter sp)
Render this fill in a Java2D Graphics2D.

Overrides:
paintShape in class RMFill

deriveStroke

public RMStroke deriveStroke(RMColor aColor)
Returns a stroke just like the receiver, except with the new given color.


deriveStroke

public RMStroke deriveStroke(float aWidth)
Returns a stroke just like the receiver, except with the new given line width.


equals

public boolean equals(java.lang.Object anObj)
Standard equals implementation.

Overrides:
equals in class RMFill

toXML

public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
XML archival.

Overrides:
toXML in class RMFill

fromXML

public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver,
                                com.reportmill.archiver.RXElement anElement)
XML unarchival.

Overrides:
fromXML in class RMFill

ReportMill 10 API