public class RMStroke
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
RMStroke()
Creates a plain, black stroke.
|
RMStroke(RMColor aColor,
double aStrokeWidth)
Creates a stroke with the given color and line width.
|
Modifier and Type | Method and Description |
---|---|
RMStroke |
clone()
Standard clone implementation.
|
RMStroke |
deriveColor(RMColor aColor)
Returns a duplicate stroke with new color.
|
RMStroke |
deriveDashArray(float... aDA)
Returns a duplicate stroke with new dash array.
|
RMStroke |
deriveDashPhase(float aDP)
Returns a duplicate stroke with new dash phase.
|
RMStroke |
deriveWidth(float aWidth)
Returns a duplicate stroke with new stroke width.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
java.lang.Object |
fromXML(XMLArchiver anArchiver,
XMLElement anElement)
XML unarchival.
|
Rect |
getBounds(RMShape aShape)
Returns the bounds required to render this fill for this shape.
|
RMColor |
getColor()
Returns the color associated with this fill.
|
float[] |
getDashArray()
Returns the dash array for this stroke.
|
static float[] |
getDashArray(java.lang.String aString,
java.lang.String aDelimeter)
Returns a dash array for given dash array string and delimeter.
|
java.lang.String |
getDashArrayString()
Returns the dash array for this stroke as a string.
|
static java.lang.String |
getDashArrayString(float[] dashArray,
java.lang.String aDelimiter)
Returns the dash array for this stroke as a string.
|
float |
getDashPhase()
Returns the dash phase.
|
java.lang.String |
getName()
Returns the name of the fill.
|
Shape |
getStrokePath(RMShape aShape)
Returns the path to be stroked, transformed from the input path.
|
float |
getWidth()
Returns the line width of this stroke.
|
Stroke |
snap()
Returns the snap version of this fill.
|
XMLElement |
toXML(XMLArchiver anArchiver)
XML archival.
|
public RMStroke()
public RMStroke(RMColor aColor, double aStrokeWidth)
public RMColor getColor()
public float getWidth()
public float[] getDashArray()
public java.lang.String getDashArrayString()
public static float[] getDashArray(java.lang.String aString, java.lang.String aDelimeter)
public static java.lang.String getDashArrayString(float[] dashArray, java.lang.String aDelimiter)
public float getDashPhase()
public Shape getStrokePath(RMShape aShape)
public Rect getBounds(RMShape aShape)
public java.lang.String getName()
public RMStroke deriveWidth(float aWidth)
public RMStroke deriveDashArray(float... aDA)
public RMStroke deriveDashPhase(float aDP)
public Stroke snap()
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public RMStroke clone()
clone
in class java.lang.Object
public XMLElement toXML(XMLArchiver anArchiver)
public java.lang.Object fromXML(XMLArchiver anArchiver, XMLElement anElement)