pub struct ServerCompositionSpriteShape { /* private fields */ }Expand description
The server-side counterpart of a
CompositionSpriteShape.
Implementations§
Source§impl ServerCompositionSpriteShape
impl ServerCompositionSpriteShape
Sourcepub fn new(
compositor: &Rc<ServerCompositor>,
) -> Rc<ServerCompositionSpriteShape>
pub fn new( compositor: &Rc<ServerCompositor>, ) -> Rc<ServerCompositionSpriteShape>
Creates the shape, active: the UI-thread shape activates its server object when it is created.
Sourcepub fn props(&self) -> &ServerCompositionSpriteShapeProps
pub fn props(&self) -> &ServerCompositionSpriteShapeProps
The properties of the shape.
Sourcepub fn shape_props(&self) -> &ServerCompositionShapeProps
pub fn shape_props(&self) -> &ServerCompositionShapeProps
The properties of CompositionShape.
Sourcepub fn transform(&self) -> Option<Matrix>
pub fn transform(&self) -> Option<Matrix>
The transform of the shape in the space of its parent; None
for the identity.
pub fn is_disposed(&self) -> bool
Source§impl ServerCompositionSpriteShape
impl ServerCompositionSpriteShape
Sourcepub fn platform_geometry(&self) -> Option<Arc<dyn IGeometryImpl>>
pub fn platform_geometry(&self) -> Option<Arc<dyn IGeometryImpl>>
The geometry of the shape, trimmed.
Sourcepub fn pen(
&self,
transform: Matrix,
brush: Option<Rc<dyn IBrush>>,
) -> Option<CompositionShapePen>
pub fn pen( &self, transform: Matrix, brush: Option<Rc<dyn IBrush>>, ) -> Option<CompositionShapePen>
The pen the shape strokes with when its transform (with the
transforms of its parents and of the view box) is transform, with
brush as the brush of the pen. None when the thickness is not
positive.
Deviation (winui-composition.md): a non-scaling stroke divides the
thickness by the square root of the determinant of transform,
exact for a uniform scale only; the platform pen has one cap, the
start cap of the shape; the dash array and offset are in multiples of
the thickness, as the dash style of the platform pen.
Trait Implementations§
Source§impl IAnimatedServerObject for ServerCompositionSpriteShape
impl IAnimatedServerObject for ServerCompositionSpriteShape
Source§fn server_object(&self) -> &ServerObject
fn server_object(&self) -> &ServerObject
ServerObject part.Source§fn get_composition_property(
&self,
field_name: &str,
) -> Option<&'static CompositionProperty>
fn get_composition_property( &self, field_name: &str, ) -> Option<&'static CompositionProperty>
Source§fn as_server_object_dyn(&self) -> &dyn IServerObject
fn as_server_object_dyn(&self) -> &dyn IServerObject
Source§fn read_property_variant(
&self,
property: &'static CompositionProperty,
) -> ExpressionVariant
fn read_property_variant( &self, property: &'static CompositionProperty, ) -> ExpressionVariant
CompositionProperty::get_variant; an object with dynamic properties (a property set)
reads its own storage.Source§fn write_property_variant(
&self,
property: &'static CompositionProperty,
value: ExpressionVariant,
)
fn write_property_variant( &self, property: &'static CompositionProperty, value: ExpressionVariant, )
CompositionProperty::set_variant; an object with dynamic properties writes its own
storage.Source§impl IServerAnimatedPropertyHost for ServerCompositionSpriteShape
impl IServerAnimatedPropertyHost for ServerCompositionSpriteShape
Source§fn set_animated_value(
&self,
property: &'static CompositionProperty,
current_value: ExpressionVariant,
committed_at: Duration,
animation: Rc<dyn IAnimationInstance>,
)
fn set_animated_value( &self, property: &'static CompositionProperty, current_value: ExpressionVariant, committed_at: Duration, animation: Rc<dyn IAnimationInstance>, )
SetAnimatedValue(prop, ref field, committedAt, animation): starts
animation on the property. current_value is the value of the
field as a variant; the animation writes the field through
CompositionProperty::set_variant.Source§fn remove_animation_for_property(&self, property: &'static CompositionProperty)
fn remove_animation_for_property(&self, property: &'static CompositionProperty)
SetAnimatedValue(prop, out field, value): the field
has been assigned directly, so the animation of the property, if
any, is removed.Source§fn notify_animated_value_changed(&self, _property: &'static CompositionProperty)
fn notify_animated_value_changed(&self, _property: &'static CompositionProperty)
property.Source§impl IServerObject for ServerCompositionSpriteShape
impl IServerObject for ServerCompositionSpriteShape
Source§fn deserialize_changes_core(
&self,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes_core( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
Source§fn values_invalidated(&self)
fn values_invalidated(&self)
Source§fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
Source§fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
Source§fn get_props(&self, type_id: TypeId) -> Option<&dyn Any>
fn get_props(&self, type_id: TypeId) -> Option<&dyn Any>
find_props; composition properties locate their
fields through it.fn as_any(&self) -> &dyn Any
fn into_any_rc(self: Rc<Self>) -> Rc<dyn Any>
Source§fn deserialize_changes(
&self,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
Source§fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
Source§fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
Source§fn as_render_data_geometry(
self: Rc<Self>,
) -> Option<Rc<dyn IRenderDataGeometry>>
fn as_render_data_geometry( self: Rc<Self>, ) -> Option<Rc<dyn IRenderDataGeometry>>
Source§fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
Source§fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>
fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>
Source§fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
Source§impl IServerPropertyHost for ServerCompositionSpriteShape
impl IServerPropertyHost for ServerCompositionSpriteShape
Source§fn server_compositor(&self) -> Option<Rc<ServerCompositor>>
fn server_compositor(&self) -> Option<Rc<ServerCompositor>>
Source§fn set_value(
&self,
_property: &'static CompositionProperty,
change: ServerValueChange<'_>,
)
fn set_value( &self, _property: &'static CompositionProperty, change: ServerValueChange<'_>, )
SetValue(prop, ref field, value) as the class of the object
defines it. A plain server object assigns; an animated object also
invalidates the subscriptions of the property; a render resource
goes through super::ServerRenderResourceCore::set_value.Source§impl IServerRenderResource for ServerCompositionSpriteShape
impl IServerRenderResource for ServerCompositionSpriteShape
fn add_observer(&self, observer: &Rc<dyn IServerRenderResourceObserver>)
fn remove_observer(&self, observer: &Rc<dyn IServerRenderResourceObserver>)
fn queued_invalidate(&self)
Source§impl IServerRenderResourceHost for ServerCompositionSpriteShape
impl IServerRenderResourceHost for ServerCompositionSpriteShape
Source§fn compositor(&self) -> Option<Rc<ServerCompositor>>
fn compositor(&self) -> Option<Rc<ServerCompositor>>
Source§fn as_render_resource_rc(&self) -> Option<Rc<dyn IServerRenderResource>>
fn as_render_resource_rc(&self) -> Option<Rc<dyn IServerRenderResource>>
Source§fn resource_property_changed(&self)
fn resource_property_changed(&self)
Source§impl IServerRenderResourceObserver for ServerCompositionSpriteShape
impl IServerRenderResourceObserver for ServerCompositionSpriteShape
fn dependency_queued_invalidate(&self, _sender: &dyn IServerRenderResource)
Source§impl ServerCompositionShapeHooks for ServerCompositionSpriteShape
impl ServerCompositionShapeHooks for ServerCompositionSpriteShape
fn deserialize_changes_extra(&self, _reader: &mut BatchStreamReader<'_>)
fn on_fields_deserialized(&self, _changed: CompositionShapeChangedFields)
Source§impl ServerCompositionSpriteShapeHooks for ServerCompositionSpriteShape
impl ServerCompositionSpriteShapeHooks for ServerCompositionSpriteShape
fn deserialize_changes_extra(&self, _reader: &mut BatchStreamReader<'_>)
fn on_fields_deserialized(&self, _changed: CompositionSpriteShapeChangedFields)
fn on_fill_brush_changed(&self)
fn on_fill_brush_changing(&self)
fn on_geometry_changed(&self)
fn on_geometry_changing(&self)
fn on_is_stroke_non_scaling_changed(&self)
fn on_is_stroke_non_scaling_changing(&self)
fn on_stroke_brush_changed(&self)
fn on_stroke_brush_changing(&self)
fn on_stroke_dash_array_changed(&self)
fn on_stroke_dash_array_changing(&self)
fn on_stroke_dash_cap_changed(&self)
fn on_stroke_dash_cap_changing(&self)
fn on_stroke_end_cap_changed(&self)
fn on_stroke_end_cap_changing(&self)
fn on_stroke_line_join_changed(&self)
fn on_stroke_line_join_changing(&self)
fn on_stroke_start_cap_changed(&self)
fn on_stroke_start_cap_changing(&self)
Auto Trait Implementations§
impl !Freeze for ServerCompositionSpriteShape
impl !RefUnwindSafe for ServerCompositionSpriteShape
impl !Send for ServerCompositionSpriteShape
impl !Sync for ServerCompositionSpriteShape
impl !UnwindSafe for ServerCompositionSpriteShape
impl Unpin for ServerCompositionSpriteShape
impl UnsafeUnpin for ServerCompositionSpriteShape
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