pub struct RedirectVisual(/* private fields */);Expand description
A visual that shows the subtree of another visual in its own place
(WinUI Microsoft.UI.Composition.RedirectVisual): the source keeps
rendering where it is, and the redirect visual draws the content and the
children of the source again, in its own coordinates, under its own
children.
The source is drawn as a CompositionVisualSurface draws it: its
content and children with their transforms, clips and opacities, the
visibility, opacity, transform and clip of the source itself ignored.
A redirect visual follows the changes of the source subtree while the
source is attached to a composition target. A redirect visual inside the
subtree of its own source draws nothing (it would contain itself).
Like a sprite visual, a redirect visual does not clip to its bounds when
it is created (clip_to_bounds is false).
Implementations§
Source§impl RedirectVisual
impl RedirectVisual
Sourcepub fn from_visual(visual: &Rc<CompositionVisual>) -> Option<RedirectVisual>
pub fn from_visual(visual: &Rc<CompositionVisual>) -> Option<RedirectVisual>
The handle of visual as a redirect visual, if it is one.
Sourcepub fn visual(&self) -> &Rc<CompositionVisual>
pub fn visual(&self) -> &Rc<CompositionVisual>
The visual as a composition visual.
Sourcepub fn source(&self) -> Option<Rc<CompositionVisual>>
pub fn source(&self) -> Option<Rc<CompositionVisual>>
The visual whose subtree the redirect visual shows.
pub fn set_source(&self, value: Option<Rc<CompositionVisual>>)
Trait Implementations§
Source§impl Clone for RedirectVisual
impl Clone for RedirectVisual
Source§impl Deref for RedirectVisual
impl Deref for RedirectVisual
Source§type Target = Rc<CompositionVisual>
type Target = Rc<CompositionVisual>
Source§fn deref(&self) -> &Rc<CompositionVisual>
fn deref(&self) -> &Rc<CompositionVisual>
Auto Trait Implementations§
impl !RefUnwindSafe for RedirectVisual
impl !Send for RedirectVisual
impl !Sync for RedirectVisual
impl !UnwindSafe for RedirectVisual
impl Freeze for RedirectVisual
impl Unpin for RedirectVisual
impl UnsafeUnpin for RedirectVisual
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