PolygonShape
Source set: Common
public fun PolygonShape(builder: PolygonShapeScope.() -> PolygonShapeGeometry): PolygonShape
Creates a PolygonShape from geometry returned by builder.
- Runs
builderin PolygonShapeScope on each resolution with the resolved - Re-reads captured state inside
builderon each resolution and rebuilds the outline when the - Interprets PolygonShapeGeometry coordinates in layout pixels (
(0f, 0f)at the top-left to
PolygonShapeScope.size, PolygonShapeScope.layoutDirection, and Density.
returned PolygonShapeGeometry changes.
(size.width, size.height) at the bottom-right). Call PolygonShapeTransformScope.scaleToFit inside PolygonShape.transform to scale custom coordinates (such as a `0f, 1f` unit square) to fit the layout bounds.
Parameters
| builder | lambda run in PolygonShapeScope returning the shape's PolygonShapeGeometry |