pub struct RenderBackdropFilter { /* private fields */ }Expand description
Applies a filter to the existing painted content and then paints child.
This effect is relatively expensive, especially if the filter is non-local, such as a blur.
Implementations§
Source§impl RenderBackdropFilter
impl RenderBackdropFilter
Sourcepub fn new(
app: &mut App,
filter_config: ImageFilterConfig,
blend_mode: BlendMode,
enabled: bool,
backdrop_key: Option<BackdropKey>,
child: Option<AnyRenderBox>,
) -> RenderHandle<Self>
pub fn new( app: &mut App, filter_config: ImageFilterConfig, blend_mode: BlendMode, enabled: bool, backdrop_key: Option<BackdropKey>, child: Option<AnyRenderBox>, ) -> RenderHandle<Self>
Creates a backdrop filter.
The blend_mode argument defaults to BlendMode::SrcOver.
Sourcepub fn enabled(self: RenderHandle<Self>, app: &App) -> bool
pub fn enabled(self: RenderHandle<Self>, app: &App) -> bool
Whether or not the backdrop filter operation will be applied to the child.
Sourcepub fn set_enabled(self: RenderHandle<Self>, app: &mut App, value: bool)
pub fn set_enabled(self: RenderHandle<Self>, app: &mut App, value: bool)
Sets enabled.
Sourcepub fn filter(self: RenderHandle<Self>, app: &App) -> ImageFilter
pub fn filter(self: RenderHandle<Self>, app: &App) -> ImageFilter
The image filter to apply to the existing painted content before painting the child.
Dart’s deprecated filter getter: only valid when the configuration was set through
set_filter.
Sourcepub fn set_filter(self: RenderHandle<Self>, app: &mut App, value: ImageFilter)
pub fn set_filter(self: RenderHandle<Self>, app: &mut App, value: ImageFilter)
Sets the filter as a direct configuration (Dart’s filter setter).
Sourcepub fn filter_config(self: RenderHandle<Self>, app: &App) -> &ImageFilterConfig
pub fn filter_config(self: RenderHandle<Self>, app: &App) -> &ImageFilterConfig
The configuration that resolves the filter against the paint bounds.
Sourcepub fn set_filter_config(
self: RenderHandle<Self>,
app: &mut App,
value: ImageFilterConfig,
)
pub fn set_filter_config( self: RenderHandle<Self>, app: &mut App, value: ImageFilterConfig, )
Sets filter_config.
Sourcepub fn blend_mode(self: RenderHandle<Self>, app: &App) -> BlendMode
pub fn blend_mode(self: RenderHandle<Self>, app: &App) -> BlendMode
The blend mode to use to apply the filtered background content onto the background surface.
Sourcepub fn set_blend_mode(self: RenderHandle<Self>, app: &mut App, value: BlendMode)
pub fn set_blend_mode(self: RenderHandle<Self>, app: &mut App, value: BlendMode)
Sets blend_mode.
Sourcepub fn backdrop_key(self: RenderHandle<Self>, app: &App) -> Option<BackdropKey>
pub fn backdrop_key(self: RenderHandle<Self>, app: &App) -> Option<BackdropKey>
The backdrop key that identifies the shared backdrop this filter belongs to.
Sourcepub fn set_backdrop_key(
self: RenderHandle<Self>,
app: &mut App,
value: Option<BackdropKey>,
)
pub fn set_backdrop_key( self: RenderHandle<Self>, app: &mut App, value: Option<BackdropKey>, )
Sets backdrop_key.
Trait Implementations§
Source§impl RenderBox for RenderBackdropFilter
impl RenderBox for RenderBackdropFilter
Source§fn render_box_data(self: RenderHandle<Self>, app: &App) -> &RenderBoxData
fn render_box_data(self: RenderHandle<Self>, app: &App) -> &RenderBoxData
Source§fn render_box_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderBoxData
fn render_box_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderBoxData
render_box_data.Source§fn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )
BoxParentData unless the child already has it. Read moreSource§fn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )
Source§fn hit_test_children(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
position: Offset,
) -> bool
fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool
Source§fn compute_min_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
get_min_intrinsic_width.
Do not call this function directly, instead, call
get_min_intrinsic_width. Read moreSource§fn compute_max_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
get_max_intrinsic_width.
Do not call this function directly, instead, call
get_max_intrinsic_width. Read moreSource§fn compute_min_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
get_min_intrinsic_height. Do not call this function
directly, instead, call get_min_intrinsic_height. Read moreSource§fn compute_max_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
get_max_intrinsic_height. Do not call this function
directly, instead, call get_max_intrinsic_height. Read moreSource§fn compute_distance_to_actual_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
) -> Option<f64>
fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>
None otherwise. Read moreSource§fn compute_dry_baseline(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
baseline: TextBaseline,
) -> Option<f64>
fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>
get_dry_baseline. Read moreSource§fn compute_dry_layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
) -> Size
fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size
get_dry_layout. Do not call this
function directly, instead, call get_dry_layout. Read moreSource§fn constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints
fn constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints
Source§fn get_min_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn get_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn get_max_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn get_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn get_min_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn get_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn get_max_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn get_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn get_dry_layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
) -> Size
fn get_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size
Source§fn get_dry_baseline(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
baseline: TextBaseline,
) -> Option<f64>
fn get_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>
Source§fn debug_cannot_compute_dry_layout(
self: RenderHandle<Self>,
failure: DryLayoutFailure<'_>,
)
fn debug_cannot_compute_dry_layout( self: RenderHandle<Self>, failure: DryLayoutFailure<'_>, )
compute_dry_layout or
compute_dry_baseline if this box does not support
calculating a dry layout. Read moreSource§fn get_distance_to_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
only_real: bool,
) -> Option<f64>
fn get_distance_to_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, only_real: bool, ) -> Option<f64>
Source§fn get_distance_to_actual_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
) -> Option<f64>
fn get_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>
Source§fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn perform_resize(self: RenderHandle<Self>, app: &mut App)
fn perform_resize(self: RenderHandle<Self>, app: &mut App)
Source§fn paint_bounds(self: RenderHandle<Self>, app: &App) -> Rect
fn paint_bounds(self: RenderHandle<Self>, app: &App) -> Rect
Source§fn has_size(self: RenderHandle<Self>, app: &App) -> bool
fn has_size(self: RenderHandle<Self>, app: &App) -> bool
size.Source§fn handle_event(
self: RenderHandle<Self>,
app: &mut App,
event: &PointerEvent,
entry: &BoxHitTestEntry,
)
fn handle_event( self: RenderHandle<Self>, app: &mut App, event: &PointerEvent, entry: &BoxHitTestEntry, )
Source§fn hit_test(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
position: Offset,
) -> bool
fn hit_test( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool
Source§fn hit_test_self(
self: RenderHandle<Self>,
_app: &App,
_position: Offset,
) -> bool
fn hit_test_self( self: RenderHandle<Self>, _app: &App, _position: Offset, ) -> bool
Source§fn set_size(self: RenderHandle<Self>, app: &mut App, size: Size)
fn set_size(self: RenderHandle<Self>, app: &mut App, size: Size)
RenderObject::perform_layout or
RenderObject::perform_resize.Source§fn layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
parent_uses_size: bool,
)
fn layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, parent_uses_size: bool, )
AnyRenderBox::layout.Source§fn as_box(self: RenderHandle<Self>) -> AnyRenderBox
fn as_box(self: RenderHandle<Self>) -> AnyRenderBox
RenderBox handle. Free: the vtable is a const, and the id is copied.Source§fn as_object(self: RenderHandle<Self>) -> AnyRenderObject
fn as_object(self: RenderHandle<Self>) -> AnyRenderObject
RenderObject handle, through as_box.Source§fn adopt_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
fn adopt_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
Source§fn drop_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
fn drop_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)
Source§fn mark_needs_paint(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_paint(self: RenderHandle<Self>, app: &mut App)
Source§fn mark_needs_composited_layer_update(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_composited_layer_update(self: RenderHandle<Self>, app: &mut App)
Source§fn mark_needs_compositing_bits_update(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_compositing_bits_update(self: RenderHandle<Self>, app: &mut App)
Source§fn schedule_initial_layout(self: RenderHandle<Self>, app: &mut App)
fn schedule_initial_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn parent(self: RenderHandle<Self>, app: &App) -> Option<AnyRenderObject>
fn parent(self: RenderHandle<Self>, app: &App) -> Option<AnyRenderObject>
Source§fn owner(self: RenderHandle<Self>, app: &App) -> Option<Handle<PipelineOwner>>
fn owner(self: RenderHandle<Self>, app: &App) -> Option<Handle<PipelineOwner>>
Source§fn debug_needs_layout(self: RenderHandle<Self>, app: &App) -> bool
fn debug_needs_layout(self: RenderHandle<Self>, app: &App) -> bool
Source§impl RenderObject for RenderBackdropFilter
impl RenderObject for RenderBackdropFilter
Source§fn render_object_data(self: RenderHandle<Self>, app: &App) -> &RenderObjectData
fn render_object_data(self: RenderHandle<Self>, app: &App) -> &RenderObjectData
Source§fn render_object_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderObjectData
fn render_object_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectData
render_object_data.Source§fn always_needs_compositing(self: RenderHandle<Self>, app: &App) -> bool
fn always_needs_compositing(self: RenderHandle<Self>, app: &App) -> bool
Source§fn perform_layout(self: RenderHandle<Self>, app: &mut App)
fn perform_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)
fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )
Source§fn visit_children(
self: RenderHandle<Self>,
app: &App,
visitor: &mut dyn FnMut(AnyRenderObject),
)
fn visit_children( self: RenderHandle<Self>, app: &App, visitor: &mut dyn FnMut(AnyRenderObject), )
visitor for each immediate child.Source§fn as_render_object(self: RenderHandle<Self>, app: &App) -> AnyRenderObject
fn as_render_object(self: RenderHandle<Self>, app: &App) -> AnyRenderObject
RenderObject: this object’s
type-erased handle, through the vtable the protocol recorded when it created it.Source§fn perform_resize(self: RenderHandle<Self>, _app: &mut App)
fn perform_resize(self: RenderHandle<Self>, _app: &mut App)
Source§fn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )
child if it has none. Read moreSource§fn did_attach(
self: RenderHandle<Self>,
app: &mut App,
owner: Handle<PipelineOwner>,
)
fn did_attach( self: RenderHandle<Self>, app: &mut App, owner: Handle<PipelineOwner>, )
attach override after super.attach(owner); the base body has
already run. The default attaches the children reported by
visit_children.Source§fn did_detach(self: RenderHandle<Self>, app: &mut App)
fn did_detach(self: RenderHandle<Self>, app: &mut App)
detach override after super.detach(). The default detaches
the children reported by visit_children.Source§fn redepth_children(self: RenderHandle<Self>, app: &mut App)
fn redepth_children(self: RenderHandle<Self>, app: &mut App)
visit_children.Source§fn sized_by_parent(self: RenderHandle<Self>, _app: &App) -> bool
fn sized_by_parent(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )
Source§fn is_repaint_boundary(self: RenderHandle<Self>, _app: &App) -> bool
fn is_repaint_boundary(self: RenderHandle<Self>, _app: &App) -> bool
Source§fn mouse_tracker_annotation(
self: RenderHandle<Self>,
_app: &App,
) -> Option<MouseTrackerAnnotation>
fn mouse_tracker_annotation( self: RenderHandle<Self>, _app: &App, ) -> Option<MouseTrackerAnnotation>
this is MouseTrackerAnnotation: the annotation this render object implements,
read live each time the mouse tracker consults it. None for a render object that is
not an annotation, which is the default.Source§fn update_composited_layer(
self: RenderHandle<Self>,
app: &mut App,
old_layer: Option<AnyOffsetLayer>,
) -> AnyOffsetLayer
fn update_composited_layer( self: RenderHandle<Self>, app: &mut App, old_layer: Option<AnyOffsetLayer>, ) -> AnyOffsetLayer
Source§fn show_on_screen(
self: RenderHandle<Self>,
app: &mut App,
descendant: Option<AnyRenderObject>,
rect: Option<Rect>,
duration: Duration,
curve: Rc<dyn Curve>,
)
fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )
RenderObject visible on screen. Read moreSource§impl RenderObjectWithChildMixin for RenderBackdropFilter
impl RenderObjectWithChildMixin for RenderBackdropFilter
Source§type ChildType = AnyRenderBox
type ChildType = AnyRenderBox
ChildType: the protocol of this render object’s child.Source§fn child_data(
self: RenderHandle<Self>,
app: &App,
) -> &RenderObjectWithChildData<AnyRenderBox>
fn child_data( self: RenderHandle<Self>, app: &App, ) -> &RenderObjectWithChildData<AnyRenderBox>
Source§fn child_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderObjectWithChildData<AnyRenderBox>
fn child_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectWithChildData<AnyRenderBox>
child_data.Source§impl RenderProxyBoxMixin for RenderBackdropFilter
impl RenderProxyBoxMixin for RenderBackdropFilter
Source§fn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )
crate::BoxParentData.Source§fn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )
Source§fn compute_min_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn compute_max_intrinsic_width(
self: RenderHandle<Self>,
app: &mut App,
height: f64,
) -> f64
fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64
Source§fn compute_min_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn compute_max_intrinsic_height(
self: RenderHandle<Self>,
app: &mut App,
width: f64,
) -> f64
fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64
Source§fn compute_distance_to_actual_baseline(
self: RenderHandle<Self>,
app: &mut App,
baseline: TextBaseline,
) -> Option<f64>
fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>
Source§fn compute_dry_baseline(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
baseline: TextBaseline,
) -> Option<f64>
fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>
Source§fn compute_dry_layout(
self: RenderHandle<Self>,
app: &mut App,
constraints: BoxConstraints,
) -> Size
fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size
compute_size_for_no_child.Source§fn perform_layout(self: RenderHandle<Self>, app: &mut App)
fn perform_layout(self: RenderHandle<Self>, app: &mut App)
Source§fn compute_size_for_no_child(
self: RenderHandle<Self>,
_app: &App,
constraints: BoxConstraints,
) -> Size
fn compute_size_for_no_child( self: RenderHandle<Self>, _app: &App, constraints: BoxConstraints, ) -> Size
Source§fn hit_test_children(
self: RenderHandle<Self>,
app: &mut App,
result: &mut BoxHitTestResult<'_>,
position: Offset,
) -> bool
fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool
Source§fn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)
fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )
Auto Trait Implementations§
impl !RefUnwindSafe for RenderBackdropFilter
impl !Send for RenderBackdropFilter
impl !Sync for RenderBackdropFilter
impl !UnwindSafe for RenderBackdropFilter
impl Freeze for RenderBackdropFilter
impl Unpin for RenderBackdropFilter
impl UnsafeUnpin for RenderBackdropFilter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> RenderObjectBase for Twhere
T: RenderObject,
impl<T> RenderObjectBase for Twhere
T: RenderObject,
Source§fn dispose(self: RenderHandle<Self>, app: &mut App)
fn dispose(self: RenderHandle<Self>, app: &mut App)
RenderObject.dispose body: releases the layer handle. An override calls it
last, where Dart writes super.dispose().Source§fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)
RenderObject.markNeedsLayout body; an override calls it where Dart writes
super.markNeedsLayout().Source§fn show_on_screen(
self: RenderHandle<Self>,
app: &mut App,
descendant: Option<AnyRenderObject>,
rect: Option<Rect>,
duration: Duration,
curve: Rc<dyn Curve>,
)
fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )
RenderObject.showOnScreen.