public class IlvBasicStroke extends BasicStroke
java.awt.BasicStroke
subclass that is bean
compliant. It represents a mutable implementation of a
BasicStroke
.
Here is an example of use in SDM:
#stroke {
class : 'ilog.views.sdm.graphic.IlvBasicStroke' ;
lineWidth : 3;
dashArray : 1,5;
endCap : CAP_ROUND;
}
CAP_BUTT, CAP_ROUND, CAP_SQUARE, JOIN_BEVEL, JOIN_MITER, JOIN_ROUND
Constructor and Description |
---|
IlvBasicStroke()
Bean constructor.
|
Modifier and Type | Method and Description |
---|---|
Shape |
createStrokedShape(Shape s)
Returns a
Shape whose interior defines the
stroked outline of a specified Shape . |
float[] |
getDashArray()
Returns the array representing the lengths of the dash segments.
|
float |
getDashPhase()
Returns the current dash phase.
|
int |
getEndCap()
Returns the end cap style.
|
int |
getLineJoin()
Returns the line join style.
|
float |
getLineWidth()
Returns the line width.
|
float |
getMiterLimit()
Returns the limit of miter joins.
|
void |
setDashArray(float[] array)
Sets the array representing the lengths of the dash segments.
|
void |
setDashPhase(float phase)
Sets the dash phase.
|
void |
setEndCap(int cap)
Sets the end cap style.
|
void |
setLineJoin(int join)
Sets the line join style.
|
void |
setLineWidth(float width)
Sets the line width.
|
void |
setMiterLimit(float limit)
Sets the miter limit.
|
equals, hashCode
public void setLineWidth(float width)
width
- The new value.public float getLineWidth()
getLineWidth
in class BasicStroke
BasicStroke
.public void setEndCap(int cap)
cap
- The new value.public int getEndCap()
getEndCap
in class BasicStroke
BasicStroke
as one
of the static int
values that define possible end cap
styles.public void setLineJoin(int join)
join
- The new value.public int getLineJoin()
getLineJoin
in class BasicStroke
BasicStroke
as one
of the static int
values that define possible line
join styles.public void setMiterLimit(float limit)
limit
- The new value.public float getMiterLimit()
getMiterLimit
in class BasicStroke
BasicStroke
.public void setDashArray(float[] array)
Shape
to be stroked, the user space
distance that the pen travels is accumulated. The distance
value is used to index into the dash array.
The pen is opaque when its current cumulative distance maps
to an even element of the dash array, and transparent otherwise.array
- The new value.public float[] getDashArray()
getDashArray
in class BasicStroke
public void setDashPhase(float phase)
phase
- The new value.public float getDashPhase()
getDashPhase
in class BasicStroke
float
value.public Shape createStrokedShape(Shape s)
Shape
whose interior defines the
stroked outline of a specified Shape
.createStrokedShape
in interface Stroke
createStrokedShape
in class BasicStroke
s
- The Shape
boundary to be strokedShape
of the stroked outline.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.