A stroke sets the visual style of a line or border.
Syntax
<Stroke color="argb-color" thickness="float" dashIntervals="string" dashPhase="string" cap="BUTT | ROUND | SQUARE" > <!-- Only the most common inner element is shown here. --> <LinearGradient /> ... <Stroke />
Attributes
The Stroke element has the following attributes:
Required attributes
The following attributes are required:
colorThe color of the stroke. You must specify the color using either the ARGB format (
#ff000000= opaque black) or the RGB format (#000000= black).From version 4, this attribute is transformable.
thicknessThe thickness of the stroke expressed as a float dimension.
This attribute is transformable.
Optional attributes
The following attributes are optional:
dashIntervals,dashPhasedashIntervalsis a space-separated series of values that describe the dash intervals. There must be an even number of dash intervals provided, with the even indices specifying the "on" intervals, and the odd indices specifying the "off" intervals.dashPhaseis an offset into the intervals array (mod the sum of all of the intervals). The default value is 0. These attributes are used to create aDashPathEffect.capDetermine the shape of the edge of the stroke. Supported values are:
BUTTcauses the stroke to end with the path, and not project beyond it.ROUNDcauses the stroke to project out as a semicircle, with the center at the end of the path.SQUAREcauses the stroke to project out as a square, with the center at the end of the path.
Inner elements
The Stroke element can contain the following elements:
Recommended for you
- Note: link text is displayed when JavaScript is off
- Stroke
- Fill
- WeightedStroke