pub struct ServerShapeVisual { /* private fields */ }Expand description
Server-side counterpart of a
ShapeVisual: its shapes,
through its view box, clipped to its size, then its children.
The visual observes its shape collection and its view box, which are render resources: a change of either, or of anything a shape shows (an animation included), redraws it.
Implementations§
Source§impl ServerShapeVisual
impl ServerShapeVisual
pub fn new() -> Self
Sourcepub fn props(&self) -> &ServerShapeVisualProps
pub fn props(&self) -> &ServerShapeVisualProps
The properties of the visual.
Sourcepub fn shapes(&self) -> Vec<Rc<dyn IServerObject>>
pub fn shapes(&self) -> Vec<Rc<dyn IServerObject>>
The shapes, in drawing order.
Sourcepub fn view_box_mapping(&self, size: Vector) -> Option<ViewBoxMapping>
pub fn view_box_mapping(&self, size: Vector) -> Option<ViewBoxMapping>
How the view box maps the shapes onto a visual of size, when the
visual has a view box that maps anything.
Trait Implementations§
Source§impl Default for ServerShapeVisual
impl Default for ServerShapeVisual
Source§impl IServerVisualContent for ServerShapeVisual
impl IServerVisualContent for ServerShapeVisual
Source§fn compute_own_content_bounds(
&self,
visual: &ServerCompositionVisual,
) -> Option<LtrbRect>
fn compute_own_content_bounds( &self, visual: &ServerCompositionVisual, ) -> Option<LtrbRect>
The size of the visual: the shapes are clipped to it.
Source§fn render_core(
&self,
visual: &ServerCompositionVisual,
context: &mut ServerVisualRenderContext<'_>,
_current_transformed_clip: LtrbRect,
)
fn render_core( &self, visual: &ServerCompositionVisual, context: &mut ServerVisualRenderContext<'_>, _current_transformed_clip: LtrbRect, )
Draws the shapes in order, clipped to the size of the visual and to the mapped view box.
Deviation (winui-composition.md): the shapes are clipped to the size of the visual (a shape visual without a size shows nothing, as in WinUI) and to the view box (the port’s reading of WinUI).
Source§fn dependency_queued_invalidate(&self, visual: &ServerCompositionVisual)
fn dependency_queued_invalidate(&self, visual: &ServerCompositionVisual)
The shape collection or the view box 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)
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.Source§fn has_update_pass_content_bounds(&self) -> bool
fn has_update_pass_content_bounds(&self) -> bool
Auto Trait Implementations§
impl !Freeze for ServerShapeVisual
impl !RefUnwindSafe for ServerShapeVisual
impl !Send for ServerShapeVisual
impl !Sync for ServerShapeVisual
impl !UnwindSafe for ServerShapeVisual
impl Unpin for ServerShapeVisual
impl UnsafeUnpin for ServerShapeVisual
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