Drawer

@Stable
class Drawer(val scope: DrawScope, textDrawer: TextDrawer)

Constructors

Link copied to clipboard
constructor(scope: DrawScope, textDrawer: TextDrawer)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val scope: DrawScope

Functions

Link copied to clipboard
fun arc(brush: Brush, startAngle: Float, sweepAngle: Float, position: Offset, size: Size, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun arc(color: Color, startAngle: Float, sweepAngle: Float, position: Offset, size: Size, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun circle(brush: Brush, position: Offset, radius: Float, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun circle(color: Color, position: Offset, radius: Float, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun circleImage(image: ImageBitmap, rect: Rect, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = BlendMode.SrcOver)
fun circleImage(image: ImageBitmap, position: Offset, size: Size, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
inline fun clip(rect: Rect, block: Drawer.() -> Unit)
inline fun clip(path: Path, block: Drawer.() -> Unit)
inline fun clip(position: Offset, size: Size, block: Drawer.() -> Unit)
Link copied to clipboard
fun drawAnimatedWebp(image: AnimatedWebp, frame: Int, dst: Rect, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = BlendMode.SrcOver)
fun drawAnimatedWebp(image: AnimatedWebp, frame: Int, position: Offset, size: Size, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun DrawTransform.fixedPerspective(ratio: Float = 1.0f, left: Offset, right: Offset, slopeLeft: Float, slopeRight: Float): Pair<Rect, Array<Offset>>
inline fun fixedPerspective(ratio: Float = 1.0f, left: Offset, right: Offset, slopeLeft: Float, slopeRight: Float, block: Drawer.(Rect, Array<Offset>) -> Unit)
Link copied to clipboard
fun DrawTransform.flipX(pivot: Offset = center)
Link copied to clipboard
fun DrawTransform.flipY(pivot: Offset = center)
Link copied to clipboard
fun image(image: ImageBitmap, rect: Rect, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = BlendMode.SrcOver)
fun image(image: ImageBitmap, position: Offset, size: Size, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = BlendMode.SrcOver)
fun image(image: ImageBitmap, src: Rect, dst: Rect, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun line(brush: Brush, start: Offset, end: Offset, style: Stroke, alpha: Float = 1.0f, blendMode: BlendMode = BlendMode.SrcOver)
fun line(color: Color, start: Offset, end: Offset, style: Stroke, alpha: Float = 1.0f, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun measureText(textCache: TextDrawer.Cache, text: String, textHeight: Float, fontWeight: FontWeight = FontWeight.Light, fontStyle: FontStyle = FontStyle.Normal, letterSpacing: Float = 0.0625f, fontIndex: Int = 0): Paragraph
Link copied to clipboard
fun oval(brush: Brush, position: Offset, radiusX: Float, radiusY: Float, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun oval(color: Color, position: Offset, radiusX: Float, radiusY: Float, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun path(brush: Brush, path: Path, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun path(color: Color, path: Path, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun DrawTransform.perspective(src: Rect, dst: Array<Offset>)
inline fun perspective(src: Rect, dst: Array<Offset>, block: Drawer.() -> Unit)
Link copied to clipboard
fun quadrilateral(brush: Brush, area: Array<Offset>, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun quadrilateral(color: Color, area: Array<Offset>, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun rect(brush: Brush, rect: Rect, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun rect(color: Color, rect: Rect, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun rect(brush: Brush, position: Offset, size: Size, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun rect(color: Color, position: Offset, size: Size, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
inline fun rotate(degrees: Float, pivot: Offset, block: Drawer.() -> Unit)
Link copied to clipboard
fun roundRect(brush: Brush, radius: Float, rect: Rect, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun roundRect(color: Color, radius: Float, rect: Rect, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun roundRect(brush: Brush, radius: Float, position: Offset, size: Size, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
fun roundRect(color: Color, radius: Float, position: Offset, size: Size, alpha: Float = 1.0f, style: DrawStyle = Fill, blendMode: BlendMode = BlendMode.SrcOver)
Link copied to clipboard
fun DrawTransform.scale(ratio: Float, pivot: Offset)
inline fun scale(ratio: Float, pivot: Offset, block: Drawer.() -> Unit)
inline fun scale(x: Float, y: Float, pivot: Offset, block: Drawer.() -> Unit)
Link copied to clipboard
fun text(content: Paragraph, brush: Brush, shadow: Shadow? = null, decoration: TextDecoration? = null, drawStyle: DrawStyle? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode)
fun text(content: Paragraph, color: Color, shadow: Shadow? = null, decoration: TextDecoration? = null, drawStyle: DrawStyle? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode)
fun text(content: Paragraph, brush: Brush, position: Offset, shadow: Shadow? = null, decoration: TextDecoration? = null, drawStyle: DrawStyle? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode)
fun text(content: Paragraph, color: Color, position: Offset, shadow: Shadow? = null, decoration: TextDecoration? = null, drawStyle: DrawStyle? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode)
Link copied to clipboard
inline fun transform(matrix: Matrix, block: Drawer.() -> Unit)
inline fun transform(transformBlock: DrawTransform.() -> Unit, block: Drawer.() -> Unit)
Link copied to clipboard
fun DrawTransform.translate(offset: Offset)
inline fun translate(offset: Offset, block: Drawer.() -> Unit)
inline fun translate(x: Float, y: Float, block: Drawer.() -> Unit)