Skip to main content

CompositionVisualProps

Struct CompositionVisualProps 

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

The UI-thread properties of CompositionVisual.

Implementations§

Source§

impl CompositionVisualProps

Source

pub fn new() -> Self

Creates the properties with every field at the default of its type. The defaults of the schema are applied by initialize_defaults.

Source

pub fn initialize_defaults(&self, host: &dyn CompositionVisualHooks)

The InitializeDefaults calls of the constructor chain: the base classes first, then this class.

Source

pub fn initialize_own_defaults(&self, host: &dyn CompositionVisualHooks)

InitializeDefaults of this class alone.

Source

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

Root (internal).

Source

pub fn set_root( &self, host: &dyn CompositionVisualHooks, value: Option<Rc<dyn ICompositionObject>>, )

Sets Root (internal).

Source

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

Parent (internal).

Source

pub fn set_parent( &self, host: &dyn CompositionVisualHooks, value: Option<Rc<dyn ICompositionObject>>, )

Sets Parent (internal).

Source

pub fn visible(&self) -> bool

Visible (animated, default true).

Source

pub fn set_visible(&self, host: &dyn CompositionVisualHooks, value: bool)

Sets Visible (animated, default true).

Source

pub fn opacity(&self) -> f32

Opacity (animated, default 1.0).

Source

pub fn set_opacity(&self, host: &dyn CompositionVisualHooks, value: f32)

Sets Opacity (animated, default 1.0).

Source

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

Clip (internal).

Source

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

Sets Clip (internal).

Source

pub fn clip_to_bounds(&self) -> bool

ClipToBounds (animated, default true).

Source

pub fn set_clip_to_bounds(&self, host: &dyn CompositionVisualHooks, value: bool)

Sets ClipToBounds (animated, default true).

Source

pub fn offset(&self) -> Vector3D

Offset (animated).

Source

pub fn set_offset(&self, host: &dyn CompositionVisualHooks, value: Vector3D)

Sets Offset (animated).

Source

pub fn translation(&self) -> Vector3D

Translation (animated).

Source

pub fn set_translation( &self, host: &dyn CompositionVisualHooks, value: Vector3D, )

Sets Translation (animated).

Source

pub fn size(&self) -> Vector

Size (animated).

Source

pub fn set_size(&self, host: &dyn CompositionVisualHooks, value: Vector)

Sets Size (animated).

Source

pub fn anchor_point(&self) -> Vector

AnchorPoint (animated).

Source

pub fn set_anchor_point(&self, host: &dyn CompositionVisualHooks, value: Vector)

Sets AnchorPoint (animated).

Source

pub fn center_point(&self) -> Vector3D

CenterPoint (animated).

Source

pub fn set_center_point( &self, host: &dyn CompositionVisualHooks, value: Vector3D, )

Sets CenterPoint (animated).

Source

pub fn rotation_angle(&self) -> f32

RotationAngle (animated).

Source

pub fn set_rotation_angle(&self, host: &dyn CompositionVisualHooks, value: f32)

Sets RotationAngle (animated).

Source

pub fn orientation(&self) -> Quaternion

Orientation (animated, default Quaternion::IDENTITY).

Source

pub fn set_orientation( &self, host: &dyn CompositionVisualHooks, value: Quaternion, )

Sets Orientation (animated, default Quaternion::IDENTITY).

Source

pub fn scale(&self) -> Vector3D

Scale (animated, default Vector3D::new(1.0, 1.0, 1.0)).

Source

pub fn set_scale(&self, host: &dyn CompositionVisualHooks, value: Vector3D)

Sets Scale (animated, default Vector3D::new(1.0, 1.0, 1.0)).

Source

pub fn transform_matrix(&self) -> Matrix

TransformMatrix (internal, animated, default Matrix::IDENTITY).

Source

pub fn set_transform_matrix( &self, host: &dyn CompositionVisualHooks, value: Matrix, )

Sets TransformMatrix (internal, animated, default Matrix::IDENTITY).

Source

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

AdornedVisual (internal).

Source

pub fn set_adorned_visual( &self, host: &dyn CompositionVisualHooks, value: Option<Rc<dyn ICompositionObject>>, )

Sets AdornedVisual (internal).

Source

pub fn adorner_is_clipped(&self) -> bool

AdornerIsClipped (internal).

Source

pub fn set_adorner_is_clipped( &self, host: &dyn CompositionVisualHooks, value: bool, )

Sets AdornerIsClipped (internal).

Source

pub fn opacity_mask_brush_transport_field( &self, ) -> Option<BatchResource<dyn IBrush>>

OpacityMaskBrush (private to the class).

Source

pub fn set_opacity_mask_brush_transport_field( &self, host: &dyn CompositionVisualHooks, value: Option<BatchResource<dyn IBrush>>, )

Sets OpacityMaskBrush (private to the class).

Source

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

Effect (internal).

Source

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

Sets Effect (internal).

Source

pub fn render_options(&self) -> RenderOptions

RenderOptions.

Source

pub fn set_render_options( &self, host: &dyn CompositionVisualHooks, value: RenderOptions, )

Sets RenderOptions.

Source

pub fn text_options(&self) -> TextOptions

TextOptions.

Source

pub fn set_text_options( &self, host: &dyn CompositionVisualHooks, value: TextOptions, )

Sets TextOptions.

Source

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

CacheMode (internal).

Source

pub fn set_cache_mode( &self, host: &dyn CompositionVisualHooks, value: Option<Rc<dyn ICompositionObject>>, )

Sets CacheMode (internal).

Source

pub fn start_animation( &self, host: &dyn CompositionVisualHooks, property_name: &str, animation: &dyn ICompositionAnimation, final_value: Option<ExpressionVariant>, ) -> bool

Connects an animation with the named property. Returns false when neither this class nor its generated bases have an animated property of that name: the caller continues with its hand-written base.

Source

pub fn serialize_changes_core( &self, host: &dyn CompositionVisualHooks, writer: &mut BatchStreamWriter<'_>, )

Writes the changes of the object: the base class first, then the changed-fields mask and the changed members of this class.

Trait Implementations§

Source§

impl Default for CompositionVisualProps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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.