LightPosition

Known direct subclasses
LightPosition.Anchored

A position measured from the composable that state is attached to with lightAnchor.

LightPosition.Global

A position measured from the top-left corner of the root of the composition that hosts the lit composable, the same space as positionInRoot.

LightPosition.Local

A position measured from the top-left corner of the composable being lit.


Where a Light sits, and the coordinate space that position is measured in.

All three variants resolve to a point in the lit composable's own space; they differ only in what offset is measured from. Use Local for a light that belongs to the composable it lights, Global for one placed against the root composable, and Anchored for one that should follow another composable.

See also
Light

Summary

Nested types

A position measured from the composable that state is attached to with lightAnchor.

A position measured from the top-left corner of the root of the composition that hosts the lit composable, the same space as positionInRoot.

A position measured from the top-left corner of the composable being lit.

Public properties

abstract DpOffset

Position of the light within the coordinate space this describes, with x increasing to the right and y increasing downwards.

Cmn

Public properties

offset

abstract val offset: DpOffset

Position of the light within the coordinate space this describes, with x increasing to the right and y increasing downwards.