Layer

@Serializable
data class Layer(val layerId: String, val parentLayerId: String? = null, val backendNodeId: Int? = null, val offsetX: Double, val offsetY: Double, val width: Double, val height: Double, val transform: List<Double>? = null, val anchorX: Double? = null, val anchorY: Double? = null, val anchorZ: Double? = null, val paintCount: Int, val drawsContent: Boolean, val invisible: Boolean? = null, val scrollRects: List<LayerTree.ScrollRect>? = null, val stickyPositionConstraint: LayerTree.StickyPositionConstraint? = null)

Information about a compositing layer.

Constructors

Link copied to clipboard
constructor(layerId: String, parentLayerId: String? = null, backendNodeId: Int? = null, offsetX: Double, offsetY: Double, width: Double, height: Double, transform: List<Double>? = null, anchorX: Double? = null, anchorY: Double? = null, anchorZ: Double? = null, paintCount: Int, drawsContent: Boolean, invisible: Boolean? = null, scrollRects: List<LayerTree.ScrollRect>? = null, stickyPositionConstraint: LayerTree.StickyPositionConstraint? = null)

Properties

Link copied to clipboard
val anchorX: Double? = null

Transform anchor point X, absent if no transform specified

Link copied to clipboard
val anchorY: Double? = null

Transform anchor point Y, absent if no transform specified

Link copied to clipboard
val anchorZ: Double? = null

Transform anchor point Z, absent if no transform specified

Link copied to clipboard
val backendNodeId: Int? = null

The backend id for the node associated with this layer.

Link copied to clipboard

Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.

Link copied to clipboard

Layer height.

Link copied to clipboard
val invisible: Boolean? = null

Set if layer is not visible.

Link copied to clipboard

The unique id for this layer.

Link copied to clipboard

Offset from parent layer, X coordinate.

Link copied to clipboard

Offset from parent layer, Y coordinate.

Link copied to clipboard

Indicates how many time this layer has painted.

Link copied to clipboard
val parentLayerId: String? = null

The id of parent (not present for root).

Link copied to clipboard

Rectangles scrolling on main thread only.

Link copied to clipboard

Sticky position constraint information

Link copied to clipboard
val transform: List<Double>? = null

Transformation matrix for layer, default is identity matrix

Link copied to clipboard

Layer width.