pub struct Layer {Show 16 fields
pub layer_id: LayerId,
pub parent_layer_id: Option<LayerId>,
pub backend_node_id: Option<BackendNodeId>,
pub offset_x: f64,
pub offset_y: f64,
pub width: f64,
pub height: f64,
pub transform: Option<Vec<f64>>,
pub anchor_x: Option<f64>,
pub anchor_y: Option<f64>,
pub anchor_z: Option<f64>,
pub paint_count: i64,
pub draws_content: bool,
pub invisible: Option<bool>,
pub scroll_rects: Option<Vec<ScrollRect>>,
pub sticky_position_constraint: Option<StickyPositionConstraint>,
}
Expand description
Information about a compositing layer. Layer
Fields§
§layer_id: LayerId
The unique id for this layer.
parent_layer_id: Option<LayerId>
The id of parent (not present for root).
backend_node_id: Option<BackendNodeId>
The backend id for the node associated with this layer.
offset_x: f64
Offset from parent layer, X coordinate.
offset_y: f64
Offset from parent layer, Y coordinate.
width: f64
Layer width.
height: f64
Layer height.
transform: Option<Vec<f64>>
Transformation matrix for layer, default is identity matrix
anchor_x: Option<f64>
Transform anchor point X, absent if no transform specified
anchor_y: Option<f64>
Transform anchor point Y, absent if no transform specified
anchor_z: Option<f64>
Transform anchor point Z, absent if no transform specified
paint_count: i64
Indicates how many time this layer has painted.
draws_content: bool
Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
invisible: Option<bool>
Set if layer is not visible.
scroll_rects: Option<Vec<ScrollRect>>
Rectangles scrolling on main thread only.
sticky_position_constraint: Option<StickyPositionConstraint>
Sticky position constraint information