pub struct LeaderLayer { /* private fields */ }Expand description
A composited layer that can be followed by a FollowerLayer.
This layer collapses the accumulated offset into a transform and passes Offset::ZERO to
its child layers in the Layer::add_to_scene / add_children_to_scene methods, so that
ContainerLayer::apply_transform will work reliably.
Implementations§
Source§impl LeaderLayer
impl LeaderLayer
Sourcepub fn new(app: &mut App, link: Handle<LayerLink>) -> Handle<LeaderLayer>
pub fn new(app: &mut App, link: Handle<LayerLink>) -> Handle<LeaderLayer>
Creates a leader layer.
The link property must not have been provided to any other LeaderLayer
layers that are attached to the layer tree at the same time.
The offset property must be non-null before the compositing phase of
the pipeline.
Sourcepub fn link(self: Handle<Self>, app: &App) -> Handle<LayerLink>
pub fn link(self: Handle<Self>, app: &App) -> Handle<LayerLink>
The object with which this layer should register.
The link will be established when this layer is Layer::attached, and will be cleared
when this layer is Layer::detached.
Trait Implementations§
Source§impl ContainerLayer for LeaderLayer
impl ContainerLayer for LeaderLayer
Source§fn apply_transform(
self: Handle<Self>,
app: &App,
_child: Option<AnyLayer>,
transform: &mut Matrix4,
)
fn apply_transform( self: Handle<Self>, app: &App, _child: Option<AnyLayer>, transform: &mut Matrix4, )
Applies the transform that would be applied when compositing the given child to the given matrix.
See ContainerLayer::apply_transform for details.
The child argument may be null, as the same transform is applied to all children.
Source§fn container_layer_data(self: Handle<Self>, app: &App) -> &ContainerLayerData
fn container_layer_data(self: Handle<Self>, app: &App) -> &ContainerLayerData
Source§fn container_layer_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut ContainerLayerData
fn container_layer_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut ContainerLayerData
container_layer_data.Source§const AS_OFFSET: Option<fn() -> &'static OffsetLayerVTable> = None
const AS_OFFSET: Option<fn() -> &'static OffsetLayerVTable> = None
extends OffsetLayer;
container_layer_accessors!(offset) sets it. Dart’s layer is OffsetLayer.Source§fn as_container_layer(self: Handle<Self>) -> AnyContainerLayer
fn as_container_layer(self: Handle<Self>) -> AnyContainerLayer
ContainerLayer.Source§fn fire_composition_callbacks(
self: Handle<Self>,
app: &mut App,
include_children: bool,
)
fn fire_composition_callbacks( self: Handle<Self>, app: &mut App, include_children: bool, )
ContainerLayer._fireCompositionCallbacks.Source§fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
ContainerLayer.supportsRasterization.Source§fn find_annotations(
self: Handle<Self>,
app: &App,
result: &mut AnnotationSearch,
local_position: Offset,
only_first: bool,
) -> bool
fn find_annotations( self: Handle<Self>, app: &App, result: &mut AnnotationSearch, local_position: Offset, only_first: bool, ) -> bool
ContainerLayer.findAnnotations.Source§fn redepth_children(self: Handle<Self>, app: &mut App)
fn redepth_children(self: Handle<Self>, app: &mut App)
ContainerLayer.redepthChildren.Source§fn add_to_scene(self: Handle<Self>, app: &mut App, builder: &mut SceneBuilder)
fn add_to_scene(self: Handle<Self>, app: &mut App, builder: &mut SceneBuilder)
ContainerLayer.addToScene.Source§impl Layer for LeaderLayer
impl Layer for LeaderLayer
Source§const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable>
const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable>
extends ContainerLayer; layer_accessors!(container)
sets it. Dart’s layer is ContainerLayer.Source§fn layer_data(self: Handle<Self>, app: &App) -> &LayerData
fn layer_data(self: Handle<Self>, app: &App) -> &LayerData
layer ([layer_accessors!]).Source§fn layer_data_mut(self: Handle<Self>, app: &mut App) -> &mut LayerData
fn layer_data_mut(self: Handle<Self>, app: &mut App) -> &mut LayerData
layer_data.Source§fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
Scene.toImage. Read moreSource§fn dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
Source§fn attach(self: Handle<Self>, app: &mut App, owner: HandleId)
fn attach(self: Handle<Self>, app: &mut App, owner: HandleId)
Source§fn detach(self: Handle<Self>, app: &mut App)
fn detach(self: Handle<Self>, app: &mut App)
Source§fn redepth_children(self: Handle<Self>, app: &mut App)
fn redepth_children(self: Handle<Self>, app: &mut App)
Source§fn find_annotations(
self: Handle<Self>,
app: &App,
result: &mut AnnotationSearch,
local_position: Offset,
only_first: bool,
) -> bool
fn find_annotations( self: Handle<Self>, app: &App, result: &mut AnnotationSearch, local_position: Offset, only_first: bool, ) -> bool
local_position. Read moreSource§fn add_to_scene(self: Handle<Self>, app: &mut App, builder: &mut SceneBuilder)
fn add_to_scene(self: Handle<Self>, app: &mut App, builder: &mut SceneBuilder)
Source§fn fire_composition_callbacks(
self: Handle<Self>,
app: &mut App,
include_children: bool,
)
fn fire_composition_callbacks( self: Handle<Self>, app: &mut App, include_children: bool, )
_fireCompositionCallbacks; ContainerLayer recurses into its children.