public class ShapeDecoration
extends java.lang.Object
Constructor and Description |
---|
ShapeDecoration(ElementTemplate[] elements,
Brush brush,
android.graphics.Path.FillType fillMode,
Pen pen)
Initializes a new instance of the ShapeDecoration class with
the specified outline, brush, pen and rule.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(android.graphics.Canvas graphics,
double rotation) |
static ShapeDecoration |
fromXmlElement(org.w3c.dom.Element e) |
Brush |
getBrush()
Gets the brush used to fill the interior of this shape.
|
android.graphics.Path.FillType |
getFillMode()
Gets a value indicating how the area is filled.
|
Pen |
getPen()
Gets the pen used to paint the frame of the shape.
|
void |
setBrush(Brush brush)
Sets the brush used to fill the interior of this shape.
|
void |
setFillMode(android.graphics.Path.FillType fillMode)
Sets a value indicating how the area is filled.
|
void |
setPen(Pen pen)
Sets the pen used to paint the frame of the shape.
|
static org.w3c.dom.Element |
toDOM(ShapeDecoration decoration,
org.w3c.dom.Document owner) |
public ShapeDecoration(ElementTemplate[] elements, Brush brush, android.graphics.Path.FillType fillMode, Pen pen)
elements
- An array of shape template elements that define shape decoration.brush
- Used to fill the interior of the shape.fillMode
- Specifies how areas are filled.pen
- Used to paint the frame of the shape.public void draw(android.graphics.Canvas graphics, double rotation)
public static org.w3c.dom.Element toDOM(ShapeDecoration decoration, org.w3c.dom.Document owner)
public static ShapeDecoration fromXmlElement(org.w3c.dom.Element e) throws javax.xml.transform.TransformerException, XmlException
javax.xml.transform.TransformerException
XmlException
public Brush getBrush()
Brush
-derived class.public void setBrush(Brush brush)
brush
- An instance of a Brush
-derived class.public android.graphics.Path.FillType getFillMode()
public void setFillMode(android.graphics.Path.FillType fillMode)
fillMode
- Path.WIND_EVEN_ODD or Path.WIND_NON_ZERO.public Pen getPen()
Pen
instance.