Package com.reportmill.graphics
Class RMStroke
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.graphics.RMFill
-
- com.reportmill.graphics.RMStroke
-
- All Implemented Interfaces:
RMArchiver.Archiving
,java.lang.Cloneable
- Direct Known Subclasses:
RMHarvardRuleStroke
public class RMStroke extends RMFill
An RMFill subclass specifically desgined to describe strokes.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(RXArchiver anArchiver, 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.java.lang.Object
initWithArchiver(RMArchiver anArchiver)
Legacy archival.void
paintShape(RMShape aShape, RMPath aPath, java.awt.Graphics2D g2, RMShapePainter sp)
Render this fill in a Java2D Graphics2D.RXElement
toXML(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
-
-
-
-
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.
-
paintShape
public void paintShape(RMShape aShape, RMPath aPath, java.awt.Graphics2D g2, RMShapePainter sp)
Render this fill in a Java2D Graphics2D.- Overrides:
paintShape
in classRMFill
-
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.
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML archival.
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.
-
initWithArchiver
public java.lang.Object initWithArchiver(RMArchiver anArchiver)
Legacy archival.- Specified by:
initWithArchiver
in interfaceRMArchiver.Archiving
- Overrides:
initWithArchiver
in classRMFill
-
-