ContentDrawScope
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.
Properties
Functions
Draws an arc from startAngle sweeping sweepAngle degrees.
Draws what this node wraps: the rest of the component's modifier chain, then the component itself.
Draws an image at its own size with its top-left corner at (x, y). An image still loading draws once it has loaded, as Graphics.drawImage does with its component as the observer.
Draws an image scaled into the specified rectangle. An image still loading draws once it has loaded, as Graphics.drawImage does with its component as the observer.
Draws a straight line between (x1, y1) and (x2, y2) using a line of width strokeWidth.
Draws a rectangle with the specified bounds. Defaults to covering the entire surface.
Draws a rounded rectangle whose corners are elliptical arcs with radii cornerRadiusX and cornerRadiusY.
Draws a pre-measured Java2D textLayout with its top-left corner positioned at (x, y).
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.