drawComposition
Draws a vector composition by applying a provided drawing function.
Return
The resulting Composition
after applying the drawing function.
Parameters
Defines the dimensions and bounds of the composition. Defaults to defaultCompositionDimensions
.
The target composition to be drawn on. If null, a new composition will be created.
Specifies the current position within the composition structure. Defaults to the root of the given composition cast as a GroupNode
.
The actual drawing logic that will be executed in the drawing context of the CompositionDrawer
.
Draws a composition within the specified document bounds or an existing composition. This function utilizes a customizable draw function to define the drawing behavior.
Return
The resulting composition after applying the draw function.
Parameters
Specifies the dimensions for the drawing area. Defaults to the full drawable area of the program.
An optional existing composition to draw onto. If not provided, a new composition is created.
An optional cursor representing the current position in the composition hierarchy. Defaults to the root of the provided composition.
A lambda function defining the drawing operations to be performed using the CompositionDrawer
.
Draws a composition using the specified document bounds and drawing logic. Optionally, an existing composition and cursor can be passed to update or build upon them.
Return
The resulting Composition
object after performing the drawing operations.
Parameters
The bounding rectangle representing the area to be drawn.
An optional existing composition to update. If null, a new composition will be created.
An optional cursor GroupNode
used as the starting position for appending new elements. Defaults to the root of the provided composition if available.
A lambda function containing the drawing operations to be applied.