public class Pen
extends java.lang.Object
implements java.io.Externalizable
DiagramItem.setPen(com.mindfusion.drawing.Pen)
method.Constructor and Description |
---|
Pen()
Initializes a new Pen instance.
|
Pen(float width,
Brush brush)
Initializes a new
Pen instance. |
Pen(float width,
Color color)
Initializes a new Pen instance.
|
Pen(float width,
Color color,
DashStyle dashStyle)
Initializes a new Pen instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a copy of this pen.
|
android.graphics.Paint |
createPaint() |
Brush |
getBrush()
Gets the color of this pen.
|
Color |
getColor()
Gets the color of this pen.
|
DashStyle |
getDashStyle()
Gets the dash style of this pen.
|
int |
getLineJoin() |
float |
getWidth()
Gets the width of the lines drawn with this pen.
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
void |
setBrush(Brush value)
Gets the color of this pen.
|
void |
setColor(Color value)
Sets the color of this pen.
|
void |
setDashStyle(DashStyle value)
Sets the dash style of this pen.
|
void |
setLineJoin(int value) |
void |
setWidth(float value)
Sets what the width of the lines drawn with this pen should be.
|
Color |
toColor() |
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
public Pen()
public Pen(float width, Color color)
width
- A float value representing the pen width.color
- A Color
object representing the pen color.public Pen(float width, Brush brush)
Pen
instance.
Instances of the Pen class created using this constructor
are currently not serialized.width
- A float value representing the pen width.color
- A Brush
object representing the pen color.public java.lang.Object clone()
clone
in class java.lang.Object
public Brush getBrush()
Brush
object representing the pen color.public void setBrush(Brush value)
value
- A Brush
object representing the pen color.public Color getColor()
Color
object representing the pen color.public void setColor(Color value)
value
- A Color
object representing the pen color.public float getWidth()
public void setWidth(float value)
value
- A float value representing the pen width.public DashStyle getDashStyle()
DashStyle
object representing the pen's dash pattern.public void setDashStyle(DashStyle value)
value
- A DashStyle
object representing the pen's dash pattern.public int getLineJoin()
public void setLineJoin(int value)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public Color toColor()
public android.graphics.Paint createPaint()