pub struct PictureLayer {
pub canvas_bounds: Rect,
/* private fields */
}Expand description
Fields§
§canvas_bounds: RectThe bounds that were used for the canvas that drew this layer’s picture.
This is purely advisory. It can help debug why certain drawing commands are being culled.
Implementations§
Source§impl PictureLayer
impl PictureLayer
Sourcepub fn new(app: &mut App, canvas_bounds: Rect) -> Handle<PictureLayer>
pub fn new(app: &mut App, canvas_bounds: Rect) -> Handle<PictureLayer>
Creates a leaf layer for the layer tree.
Sourcepub fn picture(self: Handle<Self>, app: &App) -> Option<&Arc<Picture>>
pub fn picture(self: Handle<Self>, app: &App) -> Option<&Arc<Picture>>
The picture recorded for this layer.
The picture’s coordinate system matches this layer’s coordinate system.
Sourcepub fn set_picture(
self: Handle<Self>,
app: &mut App,
picture: Option<Arc<Picture>>,
)
pub fn set_picture( self: Handle<Self>, app: &mut App, picture: Option<Arc<Picture>>, )
See picture. Dart’s _picture?.dispose() is the drop of the old one.
Sourcepub fn is_complex_hint(self: Handle<Self>, app: &App) -> bool
pub fn is_complex_hint(self: Handle<Self>, app: &App) -> bool
Hints that the painting in this layer is complex and would benefit from caching.
If this hint is not set, the compositor will apply its own heuristics to decide whether the this layer is complex enough to benefit from caching.
Sourcepub fn set_is_complex_hint(self: Handle<Self>, app: &mut App, value: bool)
pub fn set_is_complex_hint(self: Handle<Self>, app: &mut App, value: bool)
See is_complex_hint.
Sourcepub fn will_change_hint(self: Handle<Self>, app: &App) -> bool
pub fn will_change_hint(self: Handle<Self>, app: &App) -> bool
Hints that the painting in this layer is likely to change next frame.
This hint tells the compositor not to cache this layer because the cache will not be used in the future. If this hint is not set, the compositor will apply its own heuristics to decide whether this layer is likely to be reused in the future.
Sourcepub fn set_will_change_hint(self: Handle<Self>, app: &mut App, value: bool)
pub fn set_will_change_hint(self: Handle<Self>, app: &mut App, value: bool)
See will_change_hint.
Trait Implementations§
Source§impl Layer for PictureLayer
impl Layer for PictureLayer
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 dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
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)
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§const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable> = None
const AS_CONTAINER: Option<fn() -> &'static ContainerLayerVTable> = None
extends ContainerLayer; layer_accessors!(container)
sets it. Dart’s layer is ContainerLayer.Source§fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
fn supports_rasterization(self: Handle<Self>, app: &App) -> bool
Scene.toImage. Read moreSource§fn describe_clip_bounds(self: Handle<Self>, app: &App) -> Option<Rect>
fn describe_clip_bounds(self: Handle<Self>, app: &App) -> Option<Rect>
Source§fn always_needs_add_to_scene(self: Handle<Self>, app: &App) -> bool
fn always_needs_add_to_scene(self: Handle<Self>, app: &App) -> bool
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 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.