ShadowScope

Known direct subclasses
DropShadowScope

Scope that provides the capability to configure the properties of a drop shadow in order to support efficient transformations without recomposition

InnerShadowScope

Scope that provides the capability to configure the properties of an inner shadow in order to support efficient transformations without recomposition


Scope that can be used to define properties to render either a drop shadow or inner shadow. This includes the radius, spread, color, brush, alpha, blendMode, and offset parameters.

Summary

Public properties

Float

Opacity of the shadow.

Cmn
BlendMode

Blending algorithm used by the shadow.

Cmn
Brush?

The brush to use for the shadow.

Cmn
Color

Color of the shadow, Defaults to Color.Black.

Cmn
Offset

Offset of the shadow.

Cmn
Float

Blur radius of the shadow, in pixels.

Cmn
Float

Spread parameter that adds to the size of the shadow, in pixels.

Cmn

Inherited functions

From androidx.compose.ui.unit.Density
open Int

Convert Dp to Int by rounding

Cmn
open Int

Convert Sp to Int by rounding

Cmn
open Dp

Convert an Int pixel value to Dp.

Cmn
open Dp

Convert a Float pixel value to a Dp

Cmn
open DpSize

Convert a Size to a DpSize.

Cmn
open Float

Convert Dp to pixels.

Cmn
open Float

Convert Sp to pixels.

Cmn
open Rect

Convert a DpRect to a Rect.

Cmn
open Size

Convert a DpSize to a Size.

Cmn
open TextUnit

Convert an Int pixel value to Sp.

Cmn
open TextUnit

Convert a Float pixel value to a Sp

Cmn
From androidx.compose.ui.unit.FontScaling
open Dp

Convert Sp to Dp.

Cmn
open TextUnit

Convert Dp to Sp.

Cmn

Inherited properties

From androidx.compose.ui.unit.Density
Float

The logical density of the display.

Cmn
From androidx.compose.ui.unit.FontScaling
Float

Current user preference for the scaling factor for fonts.

Cmn

Public properties

alpha

var alphaFloat

Opacity of the shadow. Defaults to 1f indicating a fully opaque shadow

blendMode

var blendModeBlendMode

Blending algorithm used by the shadow. Defaults to BlendMode.SrcOver

brush

var brushBrush?

The brush to use for the shadow. If null, the color parameter is consumed instead

color

var colorColor

Color of the shadow, Defaults to Color.Black. Attempts to provide Color.Unspecified will fallback to rendering with Color.Black. This parameter is consumed if brush is null.

offset

var offsetOffset

Offset of the shadow. Defaults to Offset.Zero.

radius

var radiusFloat

Blur radius of the shadow, in pixels. Defaults to 0.

spread

var spreadFloat

Spread parameter that adds to the size of the shadow, in pixels. Defaults to 0.