pub struct ServerRedirectVisual { /* private fields */ }Expand description
Server-side counterpart of a
RedirectVisual: draws
the subtree of its source in its own coordinates, under its children.
The source is rendered through the hidden visual surface of the visual
(ServerCompositionVisualSurface::render_source_subtree), which keeps
the guard against a redirect visual inside the subtree of its own source
and follows the changes of the source (the visual observes the surface).
The bounds of the visual are its own rectangle and the bounds of the
content and children of the source, taken when the update pass of the
target reaches the visual; inside the subtree of its own source they are
its own rectangle only, so it draws nothing of the source there.
Deviation (winui-composition.md): when the source comes after the redirect visual in the tree, a change of the extent of the source reaches the bounds of the redirect visual one frame later.
Implementations§
Source§impl ServerRedirectVisual
impl ServerRedirectVisual
pub fn new() -> Self
Sourcepub fn props(&self) -> &ServerRedirectVisualProps
pub fn props(&self) -> &ServerRedirectVisualProps
The properties of the visual.
Sourcepub fn source(&self) -> Option<Rc<ServerCompositionVisual>>
pub fn source(&self) -> Option<Rc<ServerCompositionVisual>>
The visual whose subtree is shown.
Sourcepub fn source_surface(&self) -> Option<Rc<ServerCompositionVisualSurface>>
pub fn source_surface(&self) -> Option<Rc<ServerCompositionVisualSurface>>
The hidden surface that renders the source.
Trait Implementations§
Source§impl Default for ServerRedirectVisual
impl Default for ServerRedirectVisual
Source§impl IServerVisualContent for ServerRedirectVisual
impl IServerVisualContent for ServerRedirectVisual
Source§fn compute_own_content_bounds(
&self,
visual: &ServerCompositionVisual,
) -> Option<LtrbRect>
fn compute_own_content_bounds( &self, visual: &ServerCompositionVisual, ) -> Option<LtrbRect>
The rectangle of the visual and the extent of the source subtree (not when the visual is inside that subtree: it is not drawn inside itself).
Source§fn dependency_queued_invalidate(&self, visual: &ServerCompositionVisual)
fn dependency_queued_invalidate(&self, visual: &ServerCompositionVisual)
The source subtree changed (the surface was invalidated).
Source§fn deserialize_changes_core(
&self,
visual: &ServerCompositionVisual,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes_core( &self, visual: &ServerCompositionVisual, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
DeserializeChangesCore of the class; the default is the one of the
container visual.Source§fn has_update_pass_content_bounds(&self) -> bool
fn has_update_pass_content_bounds(&self) -> bool
fn size_changed(&self, visual: &ServerCompositionVisual)
fn render_core( &self, _visual: &ServerCompositionVisual, context: &mut ServerVisualRenderContext<'_>, current_transformed_clip: LtrbRect, )
Source§fn dispose(&self, visual: &ServerCompositionVisual)
fn dispose(&self, visual: &ServerCompositionVisual)
Source§fn find_props(&self, type_id: TypeId) -> Option<&dyn Any>
fn find_props(&self, type_id: TypeId) -> Option<&dyn Any>
fn get_composition_property( &self, name: &str, ) -> Option<&'static CompositionProperty>
fn as_any(&self) -> &dyn Any
fn on_attached_to_root( &self, _visual: &ServerCompositionVisual, _target: &Rc<ServerCompositionTarget>, )
fn on_detached_from_root( &self, _visual: &ServerCompositionVisual, _target: &Rc<ServerCompositionTarget>, )
fn push_clip_to_bounds( &self, visual: &ServerCompositionVisual, canvas: &mut dyn IDrawingContextImpl, )
fn has_effect(&self, visual: &ServerCompositionVisual) -> bool
Source§fn render_after_children(
&self,
_visual: &ServerCompositionVisual,
_context: &mut ServerVisualRenderContext<'_>,
)
fn render_after_children( &self, _visual: &ServerCompositionVisual, _context: &mut ServerVisualRenderContext<'_>, )
render_core pushed for the children is
popped here (not from upstream; the layer of a layer visual).Source§fn sub_tree_bounds_padding(
&self,
_visual: &ServerCompositionVisual,
) -> Option<Thickness>
fn sub_tree_bounds_padding( &self, _visual: &ServerCompositionVisual, ) -> Option<Thickness>
None for nothing.Auto Trait Implementations§
impl !Freeze for ServerRedirectVisual
impl !RefUnwindSafe for ServerRedirectVisual
impl !Send for ServerRedirectVisual
impl !Sync for ServerRedirectVisual
impl !UnwindSafe for ServerRedirectVisual
impl Unpin for ServerRedirectVisual
impl UnsafeUnpin for ServerRedirectVisual
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more