Nothing

Drawable

Shared structure for elements that contribute to a composition.

Read as Markdown

A drawable participates in its parent’s paint order and carries its own transform and appearance controls.

Example

Apply opacity to overlapping shapes together

Shapes, groups, and sequence placements are drawables. Put overlapping shapes in a group to give their assembled result one opacity. This group multiplies its opacity of 0.5 by a half-alpha mask. Along y = 20, sample x = 8, 24, and 40 to see the same gray value of about 96 in the left shape, the overlap, and the right shape.

<group opacity="0.5">
  <mask type="alpha"><shape><rect anchor-u="0" anchor-v="0" offset-y="12" width="48" height="16"/><fill><paint><solid color="#FFFFFF80"/></paint></fill></shape></mask>
  <shape blend-mode="multiply"><rect anchor-u="0" anchor-v="0" offset-y="12" width="28" height="16"/><fill><paint><solid color="#000000FF"/></paint></fill></shape>
  <shape blend-mode="multiply"><rect anchor-u="0" anchor-v="0" offset-x="20" offset-y="12" width="28" height="16"/><fill><paint><solid color="#000000FF"/></paint></fill></shape>
</group>

Complete .nothing source

Usage context

Type Drawable in the scene format type model.

Related pages in this reference are <shape>, <group>, <sequence>.

Includes Transform, Locator, Blending, Drawable effects.

Attributes

Property animation

translate-x

Value parent units · If omitted 0 · Keys Scalar · Declared by Transform

Horizontal translation.

translate-y

Value parent units · If omitted 0 · Keys Scalar · Declared by Transform

Vertical translation.

pivot-x

Value local units · If omitted 0 · Keys Scalar · Declared by Transform

Horizontal coordinate of the transform pivot.

pivot-y

Value local units · If omitted 0 · Keys Scalar · Declared by Transform

Vertical coordinate of the transform pivot.

scale-x

Value factor · If omitted 1 · Keys Scalar · Declared by Transform

Local horizontal scale. Negative values reflect the axis.

scale-y

Value factor · If omitted 1 · Keys Scalar · Declared by Transform

Local vertical scale. Negative values reflect the axis.

skew-x

Value degrees · If omitted 0 · Keys Scalar · Declared by Transform

Horizontal shear angle, strictly between −90 and 90.

rotate

Value degrees · If omitted 0 · Keys Scalar · Declared by Transform

Rotation about the drawable pivot, clockwise in default scene coordinates.

u

Value fraction of host width · Keys Scalar · Declared by Locator

Horizontal share measured from the left of the host bounds. Values outside [0, 1] select a point outside those bounds. A track requires an authored base. Omission leaves this axis at the parent origin.

v

Value fraction of host height · Keys Scalar · Declared by Locator

Vertical share measured from the top of the host bounds. Values outside [0, 1] select a point outside those bounds. A track requires an authored base. Omission leaves this axis at the parent origin.

along

Value fraction of contour length · Keys Scalar · Declared by Locator

Share of the directed contour length. Open contours use [0, 1]. Closed contours wrap across laps. A track requires an authored base.

vertex

Value vertex index · Keys Scalar · Declared by Locator

Zero-based vertex and fractional distance along its following segment. Open contours with n vertices admit [0, n − 1]. Closed contours wrap every n vertices. A track requires an authored base.

orient

Value none, auto · If omitted none · Keys Held · Declared by Locator

Facing relative to the host contour. Auto facing requires along or vertex.

opacity

Value fraction · If omitted 1 · Keys Scalar · Declared by Blending

Opacity from 0 to 1, applied once to the completed visual result.

blend-mode

Value normal, multiply, screen, pass-through · If omitted See <shape>, <group>, <sequence> · Keys Held · Declared by Blending

Blend the assembled drawable into its enclosing paint scope. See the allowed values on <sequence>.

Children

ElementsCardinalityDeclared byRole and source order
<filter>Optional, at most oneDrawable effectsSource-image operations on the assembled drawable. Independent of its position among siblings.
<backdrop-filter>Optional, at most oneDrawable effectsBlur the accumulated picture at this drawable's paint position. Independent of its position among siblings. Backdrop blur
<mask>Optional, at most oneDrawable effectsCoverage from one source shape. Independent of its position among siblings. Mask sources

Specifications

On this page