FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompositionShape

    struct · ferroui-base · v0.5.0

    struct CompositionShape
    

    A shape of a shape visual (WinUI Microsoft.UI.Composition.CompositionShape), with its own animatable transform in the space of its parent (CenterPoint, Offset, RotationAngle, Scale, TransformMatrix), applied as the transform of a visual: the transform matrix, the scale and the rotation about the center point, then the offset.

    View source

    Members

    compositor

    fn compositor(self: &Self) -> &Rc<Compositor>
    

    Source

    object

    fn object(self: &Self) -> &CompositionObject
    

    The embedded CompositionObject.

    Source

    is_disposed

    fn is_disposed(self: &Self) -> bool
    

    Source

    dispose

    fn dispose(self: &Self)
    

    Source

    type_name

    fn type_name(self: &Self) -> &'static str
    

    The name of the concrete class, for messages.

    Source

    center_point

    fn center_point(self: &Self) -> Vector
    

    The point the shape is scaled and rotated about.

    Source

    set_center_point

    fn set_center_point(self: &Self, value: Vector)
    

    Source

    offset

    fn offset(self: &Self) -> Vector
    

    The offset of the shape in the space of its parent.

    Source

    set_offset

    fn set_offset(self: &Self, value: Vector)
    

    Source

    rotation_angle

    fn rotation_angle(self: &Self) -> f32
    

    The rotation of the shape about its center point, in radians.

    Source

    set_rotation_angle

    fn set_rotation_angle(self: &Self, value: f32)
    

    Source

    rotation_angle_in_degrees

    fn rotation_angle_in_degrees(self: &Self) -> f32
    

    The rotation of the shape in degrees: a view of rotation_angle.

    Deviation (winui-composition.md): not an animation target, as for the clips.

    Source

    set_rotation_angle_in_degrees

    fn set_rotation_angle_in_degrees(self: &Self, value: f32)
    

    Source

    scale

    fn scale(self: &Self) -> Vector
    

    The scale of the shape about its center point (default (1, 1)).

    Source

    set_scale

    fn set_scale(self: &Self, value: Vector)
    

    Source

    transform_matrix

    fn transform_matrix(self: &Self) -> Matrix
    

    The transform matrix of the shape (WinUI Matrix3x2).

    Source

    set_transform_matrix

    fn set_transform_matrix(self: &Self, value: Matrix)
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • CompositionShapeCollectionHooks<CompositionShape>
    • CompositionShapeHooks
    • CompositionSpriteShapeHooks
    • CompositionContainerShapeHooks
    • IRegisterForSerialization
    • ICompositionObjectHost
    • ICompositionObjectAnimations
    • AsCompositionObject
    • ICompositionObject
    • ICompositorSerializable

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.