Represents the part of a watch face that contains one or more images.
Introduced in Wear OS 4.
Syntax
<PartImage x="integer" y="integer" width="integer" height="integer" pivotX="float" pivotY="float" angle="float-degrees" alpha="integer" name="string" scaleX="float" scaleY="float" renderMode="[SOURCE | MASK | ALL]" blendMode="string" tintColor="argb-color | rgb-color"> <!-- Image-specific child elements. A "PartImage" element must have only one of the following elements. --> <Images> <Image ... /> </Images> <Image ... /> <Photos ... /> <!-- Optionally a single ImageFilter can be applied. --> <ImageFilters ... /> <!-- Child elements that are shared across all "Part" elements. --> <Localization .../> <Transform .../> <Variant .../> <Gyro .../> <Launch .../> <ScreenReader .../> </PartImage>
Attributes
The PartImage element has the following attributes:
Required attributes
The following attributes are required:
- x,- y,- width,- height
- A collection of integers that specify the element's size and position. - These attributes are transformable. 
Optional attributes
The following attributes are optional:
- pivotX,- pivotY
- A 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. 
- angle
- A number of degrees, clockwise, that the element should be rotated about its pivot point. - This attribute is transformable. 
- alpha
- Set the level of transparency that this element should have. A value of - 0indicates that the element should be completely transparent. A value of- 255indicates that the element should be completely opaque.- This attribute is transformable. 
- name
- A string that identifies this element. Useful if you need to refer to this element from another location within your watch face file. 
- scaleX
- The horizontal scaling factor to apply to this element. - This attribute is transformable. 
- scaleY
- The vertical scaling factor to apply to this element. - This attribute is transformable. 
- renderMode
- The element's render mode type. Possible values are: - SOURCE(default),- MASK, or- ALL.
- tintColor
- Apply 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. 
- blendMode
- Sets the - blendModefor drawing this- PartImage(this element is treated as the src).
Inner elements
ThePartImage element must contain a single Image, Images or
Photos element.
All of the following elements can optionally appear once, apart from Transform
which can appear an unlimited number of times.
Recommended for you
- Note: link text is displayed when JavaScript is off
- PartImage
