Google is committed to advancing racial equity for Black communities. See how.

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, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

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

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

Unit
drawCircle(color: Color, radius: Float, center: Offset, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawImage(image: ImageAsset, topLeft: Offset, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawImage(image: ImageAsset, srcOffset: IntOffset, srcSize: IntSize, dstOffset: IntOffset, dstSize: IntSize, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawLine(brush: Brush, start: Offset, end: Offset, strokeWidth: Float, cap: StrokeCap, pathEffect: NativePathEffect?, @FloatRange(0.0, 1.0) alpha: Float, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawLine(color: Color, start: Offset, end: Offset, strokeWidth: Float, cap: StrokeCap, pathEffect: NativePathEffect?, @FloatRange(0.0, 1.0) alpha: Float, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawOval(brush: Brush, topLeft: Offset, size: Size, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawOval(color: Color, topLeft: Offset, size: Size, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawPath(path: Path, color: Color, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawPath(path: Path, brush: Brush, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawPoints(points: List<Offset>, pointMode: PointMode, color: Color, strokeWidth: Float, cap: StrokeCap, pathEffect: NativePathEffect?, @FloatRange(0.0, 1.0) alpha: Float, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawPoints(points: List<Offset>, pointMode: PointMode, brush: Brush, strokeWidth: Float, cap: StrokeCap, pathEffect: NativePathEffect?, @FloatRange(0.0, 1.0) alpha: Float, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawRect(brush: Brush, topLeft: Offset, size: Size, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawRect(color: Color, topLeft: Offset, size: Size, @FloatRange(0.0, 1.0) alpha: Float, style: DrawStyle, colorFilter: ColorFilter?, blendMode: BlendMode)

Unit
drawRoundRect(brush: Brush, topLeft: Offset, size: Size, cornerRadius: CornerRadius, @FloatRange(0.0, 1.0) alpha: Float, style: