A PartDraw contains a vector drawing primitives that appears on the watch
face. The PartDraw determines the area of the watch face the vectors are
drawn, and the inner elements determine the specifics of the
vector drawing.
Syntax
<PartDraw x="integer" y="integer" width="integer" height="integer" name="string" angle="float-degrees" pivotX="float" pivotY="float" alpha="integer" renderMode="SOURCE | MASK | ALL" tintColor="argb-color | rgb-color" blendMode="string"> <!-- Only the most common inner element is shown here. --> <Line /> ... </PartDraw>
Attributes
The PartDraw element has the following attributes:
Required attributes
The following attributes are required:
x,y,width,heightA collection of integers that specify the element's size and position.
These attributes are transformable.
Optional attributes
The following attributes are optional:
pivotX,pivotYA two-dimensional pivot point about which the element rotates. Both values are floating-point numbers that are scaled to fit in the range $ [0, 1] $.
These attributes are transformable.
angleA number of degrees, clockwise, that the element should be rotated about its pivot point.
This attribute is transformable.
alphaSet the level of transparency that this element should have. A value of
0indicates that the element should be completely transparent. A value of255indicates that the element should be completely opaque.This attribute is transformable.
nameA string that identifies this element. Useful if you need to refer to this element from another location within your watch face file.
scaleXThe horizontal scaling factor to apply to this element.
This attribute is transformable.
scaleYThe vertical scaling factor to apply to this element.
This attribute is transformable.
renderModeThe element's render mode type. Possible values are:
SOURCE(default),MASK, orALL.tintColorApply a tint color filter to the element. 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.
blendModeSets the
blendModefor drawing thisPartDraw(this element is treated as the src).
Inner elements
The PartDraw element can contain the following inner elements: