ColorPaint

class ColorPaint(val color: Color) : Paint

A basic Paint consisting of a single Color.

Author

Nicholas Eddy

Constructors

Link copied to clipboard
constructor(color: Color)

Properties

Link copied to clipboard

of the paint

Link copied to clipboard
open override val visible: Boolean

false if color.opacity == 0

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int

Inherited functions

Link copied to clipboard
fun ColorPaint.darker(percent: Float = 0.5f): ColorPaint

Makes this ColorPaint darker by the given percent.

Link copied to clipboard
Link copied to clipboard
operator fun Paint?.invoke(target: Target = Foreground, text: () -> StyledText): StyledText
@JvmName(name = "invokeString")
operator fun Paint?.invoke(target: Target = Foreground, text: () -> String): StyledText
Link copied to clipboard
fun ColorPaint.lighter(percent: Float = 0.5f): ColorPaint

Makes this ColorPaint lighter by the given percent.

Link copied to clipboard
infix fun ColorPaint.opacity(value: Float): ColorPaint

Creates a new ColorPaint like this one except with the given opacity.