Paint

sealed class Paint

A descriptor for how shapes should be painted.

Inheritors

Types

Link copied to clipboard
data class Fill(val color: Color) : Paint

Fills the inside of shape with a color.

Link copied to clipboard
data class FillAndStroke(val fill: Paint.Fill, val stroke: Paint.Stroke) : Paint
Link copied to clipboard
sealed class Gradient : Paint
Link copied to clipboard
data class GradientAndStroke(val gradient: Paint.Gradient, val stroke: Paint.Stroke) : Paint
Link copied to clipboard
data class Stroke(val color: Color, val width: Float, val cap: Paint.Stroke.Cap = Cap.Butt, val join: Paint.Stroke.Join = Join.Miter(), val dash: Paint.Stroke.Dash = Dash.None) : Paint

Draws a color around the outside of a shape.

Link copied to clipboard
data class Text(val color: Color, val size: Float, val alignment: Paint.Text.Alignment, val font: Font) : Paint

Similar to Fill, but carrying additional information necessary for text.

Functions

Link copied to clipboard
fun Paint.toAndroid(context: Context): Paint

Converts a Krayon Paint into an AndroidPaint.