ColorPainter
class ColorPainter : Painter
kotlin.Any | ||
↳ | androidx.compose.ui.graphics.painter.Painter | |
↳ | androidx.compose.ui.graphics.painter.ColorPainter |
Painter implementation used to fill the provided bounds with the specified color
Summary
Public constructors | |
---|---|
Painter implementation used to fill the provided bounds with the specified color |
Public methods | |
---|---|
Boolean | |
Int |
hashCode() |
String |
toString() |
Protected methods | |
---|---|
Boolean |
applyAlpha(alpha: Float) Apply the provided alpha value returning true if it was applied successfully, or false if it could not be applied |
Boolean |
applyColorFilter(colorFilter: ColorFilter?) Apply the provided color filter returning true if it was applied successfully, or false if it could not be applied |
Unit |
Implementation of drawing logic for instances of Painter. |
Inherited functions | |
---|---|
Properties | |
---|---|
Color | |
Size |
Drawing a color does not have an intrinsic size, return Size.Unspecified here |
Public constructors
<init>
ColorPainter(color: Color)
Painter implementation used to fill the provided bounds with the specified color
Public methods
hashCode
fun hashCode(): Int
toString
fun toString(): String
Protected methods
applyAlpha
protected fun applyAlpha(alpha: Float): Boolean
Apply the provided alpha value returning true if it was applied successfully, or false if it could not be applied
applyColorFilter
protected fun applyColorFilter(colorFilter: ColorFilter?): Boolean
Apply the provided color filter returning true if it was applied successfully, or false if it could not be applied
onDraw
protected fun DrawScope.onDraw(): Unit
Implementation of drawing logic for instances of Painter. This is invoked internally within draw after the positioning and configuring the Painter
Properties
color
val color: Color
intrinsicSize
val intrinsicSize: Size
Drawing a color does not have an intrinsic size, return Size.Unspecified here