pub struct ClipRRectLayer { /* private fields */ }Expand description
A composite layer that clips its children using a rounded rectangle.
When debugging, setting debug_disable_clip_layers
to true will cause this layer to be skipped (directly replaced by its children). This can be
helpful to track down the cause of performance problems.
Implementations§
Source§impl ClipRRectLayer
impl ClipRRectLayer
Sourcepub fn new(app: &mut App) -> Handle<ClipRRectLayer>
pub fn new(app: &mut App) -> Handle<ClipRRectLayer>
Creates a layer with a rounded-rectangular clip.
The clip_rrect and clip_behavior properties
must be non-null before the compositing phase of the pipeline.
Sourcepub fn clip_rrect(self: Handle<Self>, app: &App) -> Option<RRect>
pub fn clip_rrect(self: Handle<Self>, app: &App) -> Option<RRect>
The rounded-rect to clip in the parent’s coordinate system.
The scene must be explicitly recomposited after this property is changed (as described at
Layer).
Sourcepub fn set_clip_rrect(self: Handle<Self>, app: &mut App, value: Option<RRect>)
pub fn set_clip_rrect(self: Handle<Self>, app: &mut App, value: Option<RRect>)
See clip_rrect.
Sourcepub fn clip_behavior(self: Handle<Self>, app: &App) -> Clip
pub fn clip_behavior(self: Handle<Self>, app: &App) -> Clip
Sourcepub fn set_clip_behavior(self: Handle<Self>, app: &mut App, value: Clip)
pub fn set_clip_behavior(self: Handle<Self>, app: &mut App, value: Clip)
See clip_behavior.
Trait Implementations§
Source§impl ContainerLayer for ClipRRectLayer
impl ContainerLayer for ClipRRectLayer
Source§fn container_layer_data(self: Handle<Self>, app: &App) -> &ContainerLayerData
fn container_layer_data(self: Handle<Self>, app: &App) -> &ContainerLayerData
Mixin field access.
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
See
container_layer_data.Source§const AS_OFFSET: Option<fn() -> &'static OffsetLayerVTable> = None
const AS_OFFSET: Option<fn() -> &'static OffsetLayerVTable> = None
The offset table when this type
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
Dart’s implicit upcast of a concrete layer to
ContainerLayer.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. Read more
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 ClipRRectLayer
impl Layer for ClipRRectLayer
Source§const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable>
const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable>
The container table when this type
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
Dart’s base-class fields, held under the field
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
See
layer_data.Source§fn describe_clip_bounds(self: Handle<Self>, app: &App) -> Option<Rect>
fn describe_clip_bounds(self: Handle<Self>, app: &App) -> Option<Rect>
Describes the clip that would be applied to contents of this layer, if any.
Source§fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
Whether or not this layer, or any child layers, can be rasterized with
Scene.toImage. Read moreSource§fn dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
Clears any retained resources that this layer holds. Read more
Source§fn attach(self: Handle<Self>, app: &mut App, owner: HandleId)
fn attach(self: Handle<Self>, app: &mut App, owner: HandleId)
Mark this layer as attached to the given owner. Read more
Source§fn detach(self: Handle<Self>, app: &mut App)
fn detach(self: Handle<Self>, app: &mut App)
Mark this layer as detached from its owner. Read more
Source§fn redepth_children(self: Handle<Self>, app: &mut App)
fn redepth_children(self: Handle<Self>, app: &mut App)
Adjust the depth of this node’s children, if any. Read more
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
Search this layer and its subtree for annotations of the searched type at the location
described by
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)
Override this method to upload this layer to the engine.
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, )
Dart’s
_fireCompositionCallbacks; ContainerLayer recurses into its children.Auto Trait Implementations§
impl !RefUnwindSafe for ClipRRectLayer
impl !Send for ClipRRectLayer
impl !Sync for ClipRRectLayer
impl !UnwindSafe for ClipRRectLayer
impl Freeze for ClipRRectLayer
impl Unpin for ClipRRectLayer
impl UnsafeUnpin for ClipRRectLayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more