ColorPainter


Painter implementation used to fill the provided bounds with the specified color

Summary

Public constructors

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Protected functions

open Boolean
applyAlpha(alpha: Float)

Apply the provided alpha value returning true if it was applied successfully, or false if it could not be applied

Cmn
open Boolean

Apply the provided color filter returning true if it was applied successfully, or false if it could not be applied

Cmn
open Unit

Implementation of drawing logic for instances of Painter.

Cmn

Public properties

Color
Cmn
open Size

Drawing a color does not have an intrinsic size, return Size.Unspecified here

Cmn

Inherited functions

From androidx.compose.ui.graphics.painter.Painter
open Boolean

Apply the appropriate internal configuration to positioning content with the given LayoutDirection

Cmn
Unit
DrawScope.draw(size: Size, alpha: Float, colorFilter: ColorFilter?)
Cmn

Public constructors

ColorPainter

ColorPainter(color: Color)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Protected functions

applyAlpha

protected open 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 open 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

protected open 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

Public properties

color

val colorColor

intrinsicSize

open val intrinsicSizeSize

Drawing a color does not have an intrinsic size, return Size.Unspecified here