Android 12 Developer Preview is here! Try it out, and give us your feedback!

CanvasDrawScope

class CanvasDrawScope : DrawScope
kotlin.Any
   ↳ androidx.compose.ui.graphics.drawscope.CanvasDrawScope

Implementation of DrawScope that issues drawing commands into the specified canvas and bounds via CanvasDrawScope.draw

Summary

Public constructors

Implementation of DrawScope that issues drawing commands into the specified canvas and bounds via CanvasDrawScope.draw

Public methods
Unit
draw(density: Density, layoutDirection: LayoutDirection, canvas: Canvas, size: Size, block: DrawScope.() -> Unit)

Draws into the provided Canvas with the commands specified in the lambda with this DrawScope as a receiver

Unit
drawArc(brush: Brush, startAngle: Float, sweepAngle: Float, useCenter: Boolean, topLeft: Offset, size: Size, alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawArc(color: Color, startAngle: Float, sweepAngle: Float, useCenter: Boolean, topLeft: Offset, size: Size, alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawCircle(brush: Brush, radius: Float, center: Offset, alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawCircle(color: