CompositionViewBox
struct · ferroui-base · v0.5.0
struct CompositionViewBox
The area of the shape coordinates a shape visual or a geometric clip
shows (WinUI Microsoft.UI.Composition.CompositionViewBox): the
rectangle (offset, size) of the shapes is mapped onto the visual by
stretch and placed by the alignment ratios, as a surface brush lays
out its surface. Offset, Size and the ratios are animatable.
Deviation (winui-composition.md): what is outside the mapped view box is clipped (the port's reading of WinUI); a view box whose size is zero maps nothing (the shapes are drawn as if there were no view box).
Members
compositorobjectis_disposeddisposehorizontal_alignment_ratioset_horizontal_alignment_ratiooffsetset_offsetsizeset_sizestretchset_stretchvertical_alignment_ratioset_vertical_alignment_ratio
compositor
fn compositor(self: &Self) -> &Rc<Compositor>
object
fn object(self: &Self) -> &CompositionObject
The embedded CompositionObject.
is_disposed
fn is_disposed(self: &Self) -> bool
dispose
fn dispose(self: &Self)
horizontal_alignment_ratio
fn horizontal_alignment_ratio(self: &Self) -> f32
The part of the free horizontal space left of the mapped view box (0 left, 0.5 centre, 1 right; default 0.5).
set_horizontal_alignment_ratio
fn set_horizontal_alignment_ratio(self: &Self, value: f32)
offset
fn offset(self: &Self) -> Vector
The top left corner of the view box, in shape coordinates.
set_offset
fn set_offset(self: &Self, value: Vector)
size
fn size(self: &Self) -> Vector
The size of the view box, in shape coordinates.
set_size
fn set_size(self: &Self, value: Vector)
stretch
fn stretch(self: &Self) -> CompositionStretch
How the view box is scaled onto the visual (default Fill).
set_stretch
fn set_stretch(self: &Self, value: CompositionStretch)
vertical_alignment_ratio
fn vertical_alignment_ratio(self: &Self) -> f32
The part of the free vertical space above the mapped view box (0 top, 0.5 centre, 1 bottom; default 0.5).
set_vertical_alignment_ratio
fn set_vertical_alignment_ratio(self: &Self, value: f32)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherCompositionViewBoxHooksIRegisterForSerializationICompositionObjectHostICompositionObjectAnimationsAsCompositionObjectICompositionObjectICompositorSerializable
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.