PatternPaint

class PatternPaint(val bounds: Rectangle, val transform: AffineTransform2D = Identity, val opacity: Float = 1.0f, val paint: PatternCanvas.() -> Unit) : Paint(source)

A Paint that repeats the contents of its Canvas horizontally and vertically within a shape.

Author

Nicholas Eddy

Constructors

Link copied to clipboard
constructor(bounds: Rectangle, transform: AffineTransform2D = Identity, opacity: Float = 1.0f, paint: PatternCanvas.() -> Unit)
constructor(size: Size, transform: AffineTransform2D = Identity, opacity: Float = 1.0f, fill: PatternCanvas.() -> Unit)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

of the Canvas that will be repeated

Link copied to clipboard

global opacity of the Canvas that will be repeated

Link copied to clipboard

operations for the Canvas

Link copied to clipboard
val size: Size
Link copied to clipboard

Creates a new Stroke with defaults from the given Paint.

Link copied to clipboard

applied to the fill

Link copied to clipboard
open override val visible: Boolean

true if the Paint is visible. This could be false if the Paint's attributes (i.e. color) make it invisible if used for rendering. Returning false in such a case allows the rendering system to avoid unnecessary operations that won't be visible to the user.

Functions

Link copied to clipboard
operator fun Paint?.invoke(target: Target = Foreground, text: () -> AnnotatedString): AnnotatedString
@JvmName(name = "invokeString")
operator fun Paint?.invoke(target: Target = Foreground, text: () -> String): AnnotatedString
Link copied to clipboard
fun Paint.stroke(thickness: Double): Stroke

Creates a new Stroke with thickness from the given Paint.