Skip to main content

CompositionVisual

Struct CompositionVisual 

Source
pub struct CompositionVisual { /* private fields */ }
Expand description

A node of the composition visual tree.

Implementations§

Source§

impl CompositionVisual

Source

pub fn visible(&self) -> bool

Source

pub fn set_visible(&self, value: bool)

Source

pub fn opacity(&self) -> f32

Source

pub fn set_opacity(&self, value: f32)

Source

pub fn clip(&self) -> Option<Arc<dyn IGeometryImpl>>

The geometry the visual is clipped with.

Source

pub fn set_clip(&self, value: Option<Arc<dyn IGeometryImpl>>)

Source

pub fn clip_to_bounds(&self) -> bool

Source

pub fn set_clip_to_bounds(&self, value: bool)

Source

pub fn offset(&self) -> Vector3D

Source

pub fn set_offset(&self, value: Vector3D)

Source

pub fn translation(&self) -> Vector3D

Source

pub fn set_translation(&self, value: Vector3D)

Source

pub fn size(&self) -> Vector

Source

pub fn set_size(&self, value: Vector)

Source

pub fn anchor_point(&self) -> Vector

Source

pub fn set_anchor_point(&self, value: Vector)

Source

pub fn center_point(&self) -> Vector3D

Source

pub fn set_center_point(&self, value: Vector3D)

Source

pub fn rotation_angle(&self) -> f32

Source

pub fn set_rotation_angle(&self, value: f32)

Source

pub fn orientation(&self) -> Quaternion

Source

pub fn set_orientation(&self, value: Quaternion)

Source

pub fn scale(&self) -> Vector3D

Source

pub fn set_scale(&self, value: Vector3D)

Source

pub fn transform_matrix(&self) -> Matrix

Source

pub fn set_transform_matrix(&self, value: Matrix)

Source

pub fn adorner_is_clipped(&self) -> bool

Whether the adorner is clipped by the clips of the adorned visual and its ancestors.

Source

pub fn set_adorner_is_clipped(&self, value: bool)

Source

pub fn effect(&self) -> Option<Arc<dyn IImmutableEffect>>

Source

pub fn set_effect(&self, value: Option<Arc<dyn IImmutableEffect>>)

Source

pub fn render_options(&self) -> RenderOptions

Source

pub fn set_render_options(&self, value: RenderOptions)

Source

pub fn text_options(&self) -> TextOptions

Source

pub fn set_text_options(&self, value: TextOptions)

Source§

impl CompositionVisual

Source

pub fn visual_props(&self) -> &CompositionVisualProps

The generated properties of the visual class.

Source

pub fn compositor(&self) -> &Rc<Compositor>

Source

pub fn object(&self) -> &CompositionObject

The embedded CompositionObject.

Source

pub fn implicit_animations(&self) -> Option<Rc<ImplicitAnimationCollection>>

The collection of implicit animations attached to this object.

Source

pub fn set_implicit_animations( &self, value: Option<Rc<ImplicitAnimationCollection>>, )

Source

pub fn server(&self) -> ServerObjectId

The id of the server-side visual.

Source

pub fn is_disposed(&self) -> bool

Source

pub fn dispose(&self)

Source

pub fn children(&self) -> &Rc<CompositionVisualCollection>

The children of the visual.

Source

pub fn root(&self) -> Option<Rc<CompositionTarget>>

The composition target the visual is attached to.

Source

pub fn parent(&self) -> Option<Rc<CompositionVisual>>

Source

pub fn adorned_visual(&self) -> Option<Rc<CompositionVisual>>

The visual this visual is an adorner of: its transform follows that visual.

Source

pub fn set_adorned_visual(&self, value: Option<Rc<CompositionVisual>>)

Source

pub fn cache_mode(&self) -> Option<Rc<CompositionBitmapCache>>

Source

pub fn set_cache_mode(&self, value: Option<Rc<CompositionBitmapCache>>)

Source

pub fn disable_sub_tree_bounds_hit_test_optimization(&self) -> bool

Source

pub fn opacity_mask(&self) -> Option<Rc<dyn IBrush>>

Source

pub fn set_opacity_mask(&self, value: Option<Rc<dyn IBrush>>)

Source

pub fn try_get_valid_readback(&self) -> Option<ReadbackData>

The data the server wrote back for this visual, if it is valid for the current read revision.

Source

pub fn tag(&self) -> Option<Rc<dyn Any>>

Source

pub fn set_tag(&self, value: Option<Rc<dyn Any>>)

Source

pub fn hit_test(&self, point: Point) -> bool

Whether the content of the visual is hit at a point in its own coordinates.

Source

pub fn hit_test_geometry(&self, geometry: &Ref<Geometry>) -> IntersectionResult

How the content of the visual intersects a geometry in its own coordinates.

Trait Implementations§

Source§

impl AsCompositionObject for CompositionVisual

Source§

fn as_composition_object(&self) -> &CompositionObject

The embedded CompositionObject.
Source§

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>>

The object as a property set, if it is one (the is CompositionPropertySet test of upstream).
Source§

impl CompositionContainerVisualHooks for CompositionVisual

Source§

impl CompositionExperimentalAcrylicVisualHooks for CompositionVisual

Source§

fn base_serialize_changes_core(&self, writer: &mut BatchStreamWriter<'_>)

base.SerializeChangesCore(writer): serializes the changes of the hand-written base class CompositionDrawListVisual.
Source§

fn initialize_defaults_extra(&self)

Source§

fn validate_material_change( &self, _old_value: ImmutableExperimentalAcrylicMaterial, _new_value: ImmutableExperimentalAcrylicMaterial, )

Source§

fn on_material_changed(&self)

Source§

fn on_material_changing(&self)

Source§

fn validate_corner_radius_change( &self, _old_value: CornerRadius, _new_value: CornerRadius, )

Source§

fn on_corner_radius_changed(&self)

Source§

fn on_corner_radius_changing(&self)

Source§

impl CompositionSolidColorVisualHooks for CompositionVisual

Source§

impl CompositionSurfaceVisualHooks for CompositionVisual

Source§

impl CompositionVisualCollectionHooks<CompositionVisual> for CompositionVisualCollection

Source§

impl CompositionVisualHooks for CompositionVisual

Source§

fn on_root_changed(&self)

Source§

fn on_parent_changing(&self)

Source§

fn on_parent_changed(&self)

Source§

fn initialize_defaults_extra(&self)

Source§

fn validate_root_change( &self, _old_value: &Option<Rc<dyn ICompositionObject>>, _new_value: &Option<Rc<dyn ICompositionObject>>, )

Source§

fn on_root_changing(&self)

Source§

fn validate_parent_change( &self, _old_value: &Option<Rc<dyn ICompositionObject>>, _new_value: &Option<Rc<dyn ICompositionObject>>, )

Source§

fn validate_visible_change(&self, _old_value: bool, _new_value: bool)

Source§

fn on_visible_changed(&self)

Source§

fn on_visible_changing(&self)

Source§

fn validate_opacity_change(&self, _old_value: f32, _new_value: f32)

Source§

fn on_opacity_changed(&self)

Source§

fn on_opacity_changing(&self)

Source§

fn validate_clip_change( &self, _old_value: &Option<Arc<dyn IGeometryImpl>>, _new_value: &Option<Arc<dyn IGeometryImpl>>, )

Source§

fn on_clip_changed(&self)

Source§

fn on_clip_changing(&self)

Source§

fn validate_clip_to_bounds_change(&self, _old_value: bool, _new_value: bool)

Source§

fn on_clip_to_bounds_changed(&self)

Source§

fn on_clip_to_bounds_changing(&self)

Source§

fn validate_offset_change(&self, _old_value: Vector3D, _new_value: Vector3D)

Source§

fn on_offset_changed(&self)

Source§

fn on_offset_changing(&self)

Source§

fn validate_translation_change( &self, _old_value: Vector3D, _new_value: Vector3D, )

Source§

fn on_translation_changed(&self)

Source§

fn on_translation_changing(&self)

Source§

fn validate_size_change(&self, _old_value: Vector, _new_value: Vector)

Source§

fn on_size_changed(&self)

Source§

fn on_size_changing(&self)

Source§

fn validate_anchor_point_change(&self, _old_value: Vector, _new_value: Vector)

Source§

fn on_anchor_point_changed(&self)

Source§

fn on_anchor_point_changing(&self)

Source§

fn validate_center_point_change( &self, _old_value: Vector3D, _new_value: Vector3D, )

Source§

fn on_center_point_changed(&self)

Source§

fn on_center_point_changing(&self)

Source§

fn validate_rotation_angle_change(&self, _old_value: f32, _new_value: f32)

Source§

fn on_rotation_angle_changed(&self)

Source§

fn on_rotation_angle_changing(&self)

Source§

fn validate_orientation_change( &self, _old_value: Quaternion, _new_value: Quaternion, )

Source§

fn on_orientation_changed(&self)

Source§

fn on_orientation_changing(&self)

Source§

fn validate_scale_change(&self, _old_value: Vector3D, _new_value: Vector3D)

Source§

fn on_scale_changed(&self)

Source§

fn on_scale_changing(&self)

Source§

fn validate_transform_matrix_change( &self, _old_value: Matrix, _new_value: Matrix, )

Source§

fn on_transform_matrix_changed(&self)

Source§

fn on_transform_matrix_changing(&self)

Source§

fn validate_adorned_visual_change( &self, _old_value: &Option<Rc<dyn ICompositionObject>>, _new_value: &Option<Rc<dyn ICompositionObject>>, )

Source§

fn on_adorned_visual_changed(&self)

Source§

fn on_adorned_visual_changing(&self)

Source§

fn validate_adorner_is_clipped_change(&self, _old_value: bool, _new_value: bool)

Source§

fn on_adorner_is_clipped_changed(&self)

Source§

fn on_adorner_is_clipped_changing(&self)

Source§

fn validate_opacity_mask_brush_change( &self, _old_value: &Option<BatchResource<dyn IBrush>>, _new_value: &Option<BatchResource<dyn IBrush>>, )

Source§

fn on_opacity_mask_brush_changed(&self)

Source§

fn on_opacity_mask_brush_changing(&self)

Source§

fn validate_effect_change( &self, _old_value: &Option<Arc<dyn IImmutableEffect>>, _new_value: &Option<Arc<dyn IImmutableEffect>>, )

Source§

fn on_effect_changed(&self)

Source§

fn on_effect_changing(&self)

Source§

fn validate_render_options_change( &self, _old_value: RenderOptions, _new_value: RenderOptions, )

Source§

fn on_render_options_changed(&self)

Source§

fn on_render_options_changing(&self)

Source§

fn validate_text_options_change( &self, _old_value: TextOptions, _new_value: TextOptions, )

Source§

fn on_text_options_changed(&self)

Source§

fn on_text_options_changing(&self)

Source§

fn validate_cache_mode_change( &self, _old_value: &Option<Rc<dyn ICompositionObject>>, _new_value: &Option<Rc<dyn ICompositionObject>>, )

Source§

fn on_cache_mode_changed(&self)

Source§

fn on_cache_mode_changing(&self)

Source§

impl ICompositionObject for CompositionVisual

Source§

fn server(&self) -> ServerObjectId

The id of the server-side counterpart of the object.
Source§

fn as_any(&self) -> &dyn Any

Source§

fn into_any_rc(self: Rc<Self>) -> Rc<dyn Any>

Source§

impl ICompositionObjectAnimations for CompositionVisual

Source§

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>

The composition property with the given name.
Source§

fn composition_object(&self) -> &CompositionObject

The embedded CompositionObject.
Source§

fn start_animation( &self, property_name: &str, animation: &dyn ICompositionAnimation, )

Connects an animation with the named property of the object and starts the animation.
Source§

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)

Disconnects an animation from the named property and stops it.
Source§

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

StartAnimationGroupPart.
Source§

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)

Stops an animation group.
Source§

impl ICompositionObjectHost for CompositionVisual

Source§

fn server(&self) -> ServerObjectId

The id of the server-side counterpart of the object.
Source§

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>>

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

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 CompositionVisual

Source§

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<'_>)

Writes the pending changes of the object for compositor c.
Source§

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)

Called before the changes of the object are written for compositor c. Read more
Source§

impl IRegisterForSerialization for CompositionVisual

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.