Skip to main content

Module shape

Module shape 

Source
Expand description

Compose-style shapes and their resolution against a layout Rect.

A Shape is authored in density-independent pixels (or as a relative percentage) and is resolved once layout has produced a px-space Rect. The resolved form, ResolvedShape, is what the paint layer consumes.

Structs§

ShapePath
An arbitrary shape described by path commands in Dp-local space.

Enums§

PathCommand
A single command of a ShapePath, in Dp-local coordinates relative to the element’s top-left corner. The paint layer converts these to px with the ambient density and adds the resolved offset.
ResolvedShape
A Shape resolved to px-space against a concrete layout Rect.
Shape
A Compose-style shape.

Type Aliases§

CornerRadii
Corner radii order used by ResolvedShape::Rect and Shape::Rounded: [top_left, top_right, bottom_right, bottom_left] (CSS order).