pub struct CompositionGradientStop { /* private fields */ }Expand description
A gradient stop of the composition brushes, with animatable color and offset.
Implementations§
Source§impl CompositionGradientStop
impl CompositionGradientStop
pub fn compositor(&self) -> &Rc<Compositor>
Sourcepub fn object(&self) -> &CompositionObject
pub fn object(&self) -> &CompositionObject
The embedded CompositionObject.
Sourcepub fn server(&self) -> ServerObjectId
pub fn server(&self) -> ServerObjectId
The id of the server-side stop.
pub fn color(&self) -> Color
pub fn set_color(&self, value: Color)
pub fn offset(&self) -> f64
pub fn set_offset(&self, value: f64)
Sourcepub fn implicit_animations(&self) -> Option<Rc<ImplicitAnimationCollection>>
pub fn implicit_animations(&self) -> Option<Rc<ImplicitAnimationCollection>>
The collection of implicit animations attached to this object.
pub fn set_implicit_animations( &self, value: Option<Rc<ImplicitAnimationCollection>>, )
Trait Implementations§
Source§impl AsCompositionObject for CompositionGradientStop
impl AsCompositionObject for CompositionGradientStop
Source§fn as_composition_object(&self) -> &CompositionObject
fn as_composition_object(&self) -> &CompositionObject
The embedded
CompositionObject.Source§fn composition_type_name(&self) -> &'static str
fn composition_type_name(&self) -> &'static str
The name of the class of the object, for messages.
Source§fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
The object as a property set, if it is one (the
is CompositionPropertySet test of upstream).Source§impl CompositionGradientStopHooks for CompositionGradientStop
InitializeDefaultsExtra activates the server object: done when the
server object is created (see ServerCompositionGradientStop::new).
impl CompositionGradientStopHooks for CompositionGradientStop
InitializeDefaultsExtra activates the server object: done when the
server object is created (see ServerCompositionGradientStop::new).
fn initialize_defaults_extra(&self)
fn validate_color_change(&self, _old_value: Color, _new_value: Color)
fn on_color_changed(&self)
fn on_color_changing(&self)
fn validate_offset_change(&self, _old_value: f64, _new_value: f64)
fn on_offset_changed(&self)
fn on_offset_changing(&self)
Source§impl ICompositionObjectAnimations for CompositionGradientStop
impl ICompositionObjectAnimations for CompositionGradientStop
Source§fn try_start_animation(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
final_value: Option<ExpressionVariant>,
) -> bool
fn try_start_animation( &self, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, ) -> bool
StartAnimation(propertyName, animation, finalValue) of the class:
returns false for a property the class does not know.Source§fn get_composition_property(
&self,
property_name: &str,
) -> Option<&'static CompositionProperty>
fn get_composition_property( &self, property_name: &str, ) -> Option<&'static CompositionProperty>
The composition property with the given name.
Source§fn composition_object(&self) -> &CompositionObject
fn composition_object(&self) -> &CompositionObject
The embedded
CompositionObject.Source§fn start_animation(
&self,
property_name: &str,
animation: &dyn ICompositionAnimation,
)
fn start_animation( &self, property_name: &str, animation: &dyn ICompositionAnimation, )
Connects an animation with the named property of the object and
starts the animation.
fn start_animation_with_final_value( &self, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, )
Source§fn stop_animation(&self, property_name: &str)
fn stop_animation(&self, property_name: &str)
Disconnects an animation from the named property and stops it.
Source§fn start_animation_group(&self, grp: &dyn ICompositionAnimationBase)
fn start_animation_group(&self, grp: &dyn ICompositionAnimationBase)
Starts an animation group.
The StartAnimationGroup method on CompositionObject lets you start CompositionAnimationGroup.
All the animations in the group will be started at the same time on the object.
Source§fn start_animation_group_part(
&self,
animation: &dyn ICompositionAnimation,
target: &str,
final_value: ExpressionVariant,
) -> bool
fn start_animation_group_part( &self, animation: &dyn ICompositionAnimation, target: &str, final_value: ExpressionVariant, ) -> bool
StartAnimationGroupPart.Source§fn start_animation_group_for(
&self,
grp: &dyn ICompositionAnimationBase,
target: &str,
final_value: ExpressionVariant,
) -> bool
fn start_animation_group_for( &self, grp: &dyn ICompositionAnimationBase, target: &str, final_value: ExpressionVariant, ) -> bool
Starts an animation or an animation group triggered by the change
of property
target to final_value. Returns whether one of the
animations targets that property.Source§fn stop_animation_group(&self, grp: &dyn ICompositionAnimationBase)
fn stop_animation_group(&self, grp: &dyn ICompositionAnimationBase)
Stops an animation group.
Source§impl ICompositionObjectHost for CompositionGradientStop
impl ICompositionObjectHost for CompositionGradientStop
Source§fn server(&self) -> ServerObjectId
fn server(&self) -> ServerObjectId
The id of the server-side counterpart of the object.
Source§fn pending_animations(&self) -> &PendingAnimations
fn pending_animations(&self) -> &PendingAnimations
The animations waiting to be sent with the next batch.
Source§fn implicit_animation(
&self,
property_name: &str,
) -> Option<Rc<dyn ICompositionAnimationBase>>
fn implicit_animation( &self, property_name: &str, ) -> Option<Rc<dyn ICompositionAnimationBase>>
The implicit animation attached to a property of the object, if
there is one (
ImplicitAnimations?.TryGetValue(name)).Source§fn start_animation_group(
&self,
grp: &Rc<dyn ICompositionAnimationBase>,
target: &str,
final_value: ExpressionVariant,
) -> bool
fn start_animation_group( &self, grp: &Rc<dyn ICompositionAnimationBase>, target: &str, final_value: ExpressionVariant, ) -> bool
Starts an animation or an animation group triggered by the change
of property
target to final_value. Returns whether one of the
animations targets that property.Source§impl ICompositorSerializable for CompositionGradientStop
impl ICompositorSerializable for CompositionGradientStop
Source§fn try_get_server(&self, c: &Compositor) -> Option<ServerObjectId>
fn try_get_server(&self, c: &Compositor) -> Option<ServerObjectId>
The server-side counterpart of the object on compositor
c, if it
has one.Source§fn serialize_changes(&self, c: &Compositor, writer: &mut BatchStreamWriter<'_>)
fn serialize_changes(&self, c: &Compositor, writer: &mut BatchStreamWriter<'_>)
Writes the pending changes of the object for compositor
c.Source§fn serialization_key(&self) -> *const ()
fn serialization_key(&self) -> *const ()
The identity of the object, by which a compositor avoids queueing
it twice. The default is the address of the implementing value; an
adapter around an object returns the identity of that object.
Source§fn prepare_serialization(&self, _c: &Compositor)
fn prepare_serialization(&self, _c: &Compositor)
Called before the changes of the object are written for compositor
c. Read moreSource§impl IGradientStop for CompositionGradientStop
impl IGradientStop for CompositionGradientStop
Source§fn as_composition_gradient_stop(&self) -> Option<&CompositionGradientStop>
fn as_composition_gradient_stop(&self) -> Option<&CompositionGradientStop>
The stop as a composition gradient stop, if it is one (the
is CompositionGradientStop test of upstream).Source§fn is_immutable_gradient_stop(&self) -> bool
fn is_immutable_gradient_stop(&self) -> bool
Whether the stop is an
ImmutableGradientStop
(the as ImmutableGradientStop test of upstream).Auto Trait Implementations§
impl !Freeze for CompositionGradientStop
impl !RefUnwindSafe for CompositionGradientStop
impl !Send for CompositionGradientStop
impl !Sync for CompositionGradientStop
impl !UnwindSafe for CompositionGradientStop
impl Unpin for CompositionGradientStop
impl UnsafeUnpin for CompositionGradientStop
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