Class

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.

Source set: Common
public class Global(override val offset: DpOffset) : LightPosition()

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 Popup or Dialog has its own root.

The light is fixed in the root composable, so moving or scrolling the lit composable moves it through the light and the shading changes accordingly. Use this for a single light shared by several composables that should agree on where it is.

Parameters

offset position of the light relative to the root's top-left corner.

Functions

equals

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

toString

Source set: Common
override fun toString(): String
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: