Types

Link copied to clipboard

The fill of the element that a marker is drawn for, like SVG's context-fill; elsewhere it is none

Link copied to clipboard

The stroke of the element that a marker is drawn for, like SVG's context-stroke; elsewhere it is none

Link copied to clipboard

the value of the color property, like SVG's currentColor; it has no color of its own

Link copied to clipboard
sealed interface Gradient : Paint.Server

A gradient with color stops, like the gradients of SVG. id is the id of the gradient in SVG documents.

Link copied to clipboard
data class LinearGradient(val start: Vector2, val end: Vector2, val stops: List<ColorStop>, val units: PaintUnits = PaintUnits.BOUNDS, val spread: GradientSpread = GradientSpread.PAD, val transform: Matrix44 = Matrix44.IDENTITY, val id: String = "", val interpolation: GradientInterpolation = GradientInterpolation.SRGB) : Paint.Gradient

A linear gradient from start to end, like SVG's linearGradient

Link copied to clipboard
object None : Paint
Link copied to clipboard
class Pattern(val content: GroupNode, val tile: Rectangle, val units: PaintUnits = PaintUnits.BOUNDS, val contentUnits: PaintUnits = PaintUnits.OBJECT, val viewBox: Rectangle? = null, val aspectRatio: AspectRatio = AspectRatio.DEFAULT, val transform: Matrix44 = Matrix44.IDENTITY, val id: String = "", val fallback: ColorRGBa? = null) : Paint.Server

A pattern, like SVG's pattern: content drawn in a tile that is repeated in both directions.

Link copied to clipboard
class Preset(val preset: SourcePreset, val units: PaintUnits = PaintUnits.BOUNDS, val transform: Matrix44 = Matrix44.IDENTITY, val fallback: ColorRGBa? = null) : Paint.Server

A paint of any preset that generates colors, such as noise or checkers. It is not written to SVG documents, fallback is written instead.

Link copied to clipboard
data class RadialGradient(val center: Vector2, val radius: Double, val focal: Vector2 = center, val focalRadius: Double = 0.0, val stops: List<ColorStop>, val units: PaintUnits = PaintUnits.BOUNDS, val spread: GradientSpread = GradientSpread.PAD, val transform: Matrix44 = Matrix44.IDENTITY, val id: String = "", val interpolation: GradientInterpolation = GradientInterpolation.SRGB) : Paint.Gradient

A radial gradient from the circle at focal with focalRadius to the circle at center with radius, like SVG's radialGradient

Link copied to clipboard
class RGB(val value: ColorRGBa) : Paint
Link copied to clipboard
sealed interface Server : Paint

A paint that is drawn with a shade style: its source read at coordinates in units, transformed by the inverse of transform. value is a single color that stands in for it where it can not be drawn.

Properties

Link copied to clipboard
abstract override val value: ColorRGBa?

Functions

Link copied to clipboard
abstract override fun toString(): String