DropShadowPainter


Painter implementation that draws a drop shadow with the geometry defined by the specified shape and DropShadow parameters.

Summary

Public constructors

DropShadowPainter(shape: Shape, dropShadow: DropShadow)

Create a DropShadowPainter with the specified shape and dropShadow.

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 Boolean

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

Cmn
open Unit

Implementation of drawing logic for instances of Painter.

Cmn

Public properties

open Size

Return the intrinsic size of the Painter.

Cmn

Inherited functions

From androidx.compose.ui.graphics.painter.Painter
Unit
DrawScope.draw(size: Size, alpha: Float, colorFilter: ColorFilter?)
Cmn

Public constructors

DropShadowPainter

DropShadowPainter(shape: Shape, dropShadow: DropShadow)

Create a DropShadowPainter with the specified shape and dropShadow. It is preferred to obtain an instance of the DropShadowPainter through a ShadowContext instance instead, as the underlying shadow dependencies can be shared across multiple DropShadowPainter instances. However, creating an instance through this constructor will not share resources with any other DropShadowPainter.

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

applyLayoutDirection

protected open fun applyLayoutDirection(layoutDirection: LayoutDirection): Boolean

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

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

intrinsicSize

open val intrinsicSizeSize

Return the intrinsic size of the Painter. If the there is no intrinsic size (i.e. filling bounds with an arbitrary color) return Size.Unspecified. If there is no intrinsic size in a single dimension, return Size with Float.NaN in the desired dimension. If a Painter does not have an intrinsic size, it will always draw within the full bounds of the destination