Package-level declarations
Types
The receiver scope of a draw node, which draws between other operations on the same surface. If drawContent is not called, what the node wraps is not drawn.
The receiver scope for drawing operations inside org.jetbrains.compose.swing.foundation.Canvas, aligned with androidx's DrawScope.
Marks declarations that belong to the DrawScope drawing DSL, preventing nested scopes from calling into outer scope drawing operations without explicit qualification.
Defines transformations that can be applied to the canvas coordinate system within a withTransform block.
Functions
Draws a straight line between (x1, y1) and (x2, y2) using a line of width strokeWidth.
Draws textLayout with its top-left corner positioned at topLeft.
Insets the left and right of the drawing area by horizontal and its top and bottom by vertical for the duration of block; see the four-sided inset.
Records block into layer, the counterpart of androidx's GraphicsLayer.record inside a DrawScope: block draws in this scope's coordinates and size, onto a recording aligned to the device pixels this scope draws on, so a drawContent() inside it records the content where it would have painted. Draw it back with ImageLayer.draw on DrawScope.graphics. Where the clip leaves nothing to draw, block does not run and layer is left empty.
Executes drawBlock with transformations applied in transformBlock, restoring the previous transform and clip state afterwards.