group
inline fun group(transform: Transform = Transform.IDENTITY, size: Size? = null, clip: Path? = null, clipToBounds: Boolean = false, block: CanvasScope.() -> Unit)
Creates a group. Groups can be used to treat multiple drawing commands as a single one and applying transforms or clips to all of them at the same time. For a group, first the transform is applied, then the content is drawn inside the transformed coordinates and then the clip is applied to the drawn content.
Parameters
transform
The transform that will be applied to the children of the group
size
The size of the group
clip
The path describing the shape of the clip that will be applied to the children of the group
clipToBounds
The group will be clipped to its bounds if this is set to true and clip is null. Defaults to false.
block
The lambda callback to issue drawing commands