Skip to main content

layer_scene

Function layer_scene 

pub fn layer_scene(scene: &Scene, layer: u32)
Expand description

Floating surfaces drawn into scene sit on layer. The host names every scene it draws its frame into, so it can rebuild what lies below a surface: the scenes it composes under that layer, plus RecordedBackdrop::below. A host drawing one scene names it once.

A surface drawn into any other scene — a scratch scene, or a cache a widget appends later without nest_scene — has no known backdrop and stays opaque. scene must not move while the recording is active; naming a layer again replaces its scene. A no-op outside a recording.