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: JsFloat,
pub offset_y: JsFloat,
pub width: JsFloat,
pub height: JsFloat,
pub transform: Option<Vec<JsFloat>>,
pub anchor_x: Option<JsFloat>,
pub anchor_y: Option<JsFloat>,
pub anchor_z: Option<JsFloat>,
pub paint_count: JsUInt,
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.
Fields§
§layer_id: LayerIdThe 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: JsFloatOffset from parent layer, X coordinate.
offset_y: JsFloatOffset from parent layer, Y coordinate.
width: JsFloatLayer width.
height: JsFloatLayer height.
transform: Option<Vec<JsFloat>>Transformation matrix for layer, default is identity matrix
anchor_x: Option<JsFloat>Transform anchor point X, absent if no transform specified
anchor_y: Option<JsFloat>Transform anchor point Y, absent if no transform specified
anchor_z: Option<JsFloat>Transform anchor point Z, absent if no transform specified
paint_count: JsUIntIndicates how many time this layer has painted.
draws_content: boolIndicates 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