pub struct ServerSpriteVisual { /* private fields */ }Expand description
Server-side counterpart of a
SpriteVisual: the shadow
of its rectangle, of its mask or of the alpha of its brush (see
ServerDropShadow::render_under_rect and
ServerDropShadow::render_shadow_of), then its brush over
(0, 0, size), then its children.
The visual observes its brush and its shadow, which are render resources: a change of either (an animation included) redraws it.
Implementations§
Source§impl ServerSpriteVisual
impl ServerSpriteVisual
pub fn new() -> Self
Sourcepub fn props(&self) -> &ServerSpriteVisualProps
pub fn props(&self) -> &ServerSpriteVisualProps
The properties of the visual.
Sourcepub fn brush(&self) -> Option<Rc<dyn IServerObject>>
pub fn brush(&self) -> Option<Rc<dyn IServerObject>>
The brush: a server-side composition brush.
Sourcepub fn shadow(&self) -> Option<Rc<ServerDropShadow>>
pub fn shadow(&self) -> Option<Rc<ServerDropShadow>>
The shadow.
Trait Implementations§
Source§impl Default for ServerSpriteVisual
impl Default for ServerSpriteVisual
Source§impl IServerVisualContent for ServerSpriteVisual
impl IServerVisualContent for ServerSpriteVisual
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, with the area of its shadow.
Source§fn dependency_queued_invalidate(&self, visual: &ServerCompositionVisual)
fn dependency_queued_invalidate(&self, visual: &ServerCompositionVisual)
The brush or the shadow changed.
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.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)
The visual has been disposed on the UI thread.
Source§fn find_props(&self, type_id: TypeId) -> Option<&dyn Any>
fn find_props(&self, type_id: TypeId) -> Option<&dyn Any>
The generated property block of the given type, if the class has
one of its own.
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<'_>, )
Called by the render walk after the children of the visual were
rendered, before the opacity mask, effect, clips and transform of the
visual are popped: what
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>
What the content adds around the bounds of the subtree, like the
output padding of an effect (not from upstream; the shadow of a layer
visual).
None for nothing.Source§fn has_update_pass_content_bounds(&self) -> bool
fn has_update_pass_content_bounds(&self) -> bool
Whether the bounds of the own content depend on other visuals and are
computed again when the update pass of the target reaches the visual
(not from upstream; a redirect visual covers the bounds of its source
as that pass leaves them).
Auto Trait Implementations§
impl !Freeze for ServerSpriteVisual
impl !RefUnwindSafe for ServerSpriteVisual
impl !Send for ServerSpriteVisual
impl !Sync for ServerSpriteVisual
impl !UnwindSafe for ServerSpriteVisual
impl Unpin for ServerSpriteVisual
impl UnsafeUnpin for ServerSpriteVisual
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more