-
public final class DrawContextExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static UnitwithCanvas(DrawContext $self, Function1<Canvas, Unit> block)Calls the specified function block with DrawContext.canvas as its receiver. final static DrawContextdrawContext(Canvas canvas, Float density, Float fontScale, Boolean isLtr, Long elevationOverlayColor)Creates an anonymous implementation of DrawContext. -
-
Method Detail
-
withCanvas
final static Unit withCanvas(DrawContext $self, Function1<Canvas, Unit> block)
Calls the specified function block with DrawContext.canvas as its receiver.
-
drawContext
final static DrawContext drawContext(Canvas canvas, Float density, Float fontScale, Boolean isLtr, Long elevationOverlayColor)
Creates an anonymous implementation of DrawContext.
- Parameters:
canvas- the canvas to draw the chart on.density- the pixel density of the screen (used in pixel size calculation).fontScale- the scale of fonts.isLtr- whether the device layout is left-to-right.elevationOverlayColor- the elevation overlay color.
-
-
-
-