Package 

Class DrawContextExtensionsKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit withCanvas(DrawContext $self, Function1<Canvas, Unit> block) Calls the specified function block with DrawContext.canvas as its receiver.
      final static DrawContext drawContext(Canvas canvas, Float density, Float fontScale, Boolean isLtr, Long elevationOverlayColor) Creates an anonymous implementation of DrawContext.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.