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 RMStrokederiveStroke(float aWidth)Returns a stroke just like the receiver, except with the new given line width.RMStrokederiveStroke(RMColor aColor)Returns a stroke just like the receiver, except with the new given color.booleanequals(java.lang.Object anObj)Standard equals implementation.java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.RMRectgetBounds(RMShape aShape, RMRect pathBounds)Returns the bounds required to render this fill for this shape.floatgetLineWidth()Returns the line width of this stroke.RMPathgetPath(RMPath inputPath)Returns the path to be stroked, transformed from the input path.java.lang.ObjectinitWithArchiver(RMArchiver anArchiver)Legacy archival.voidpaintShape(RMShape aShape, RMPath aPath, java.awt.Graphics2D g2, RMShapePainter sp)Render this fill in a Java2D Graphics2D.RXElementtoXML(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:
paintShapein 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:
initWithArchiverin interfaceRMArchiver.Archiving- Overrides:
initWithArchiverin classRMFill
-
-