FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompositionNineGridBrush

    struct · ferroui-base · v0.5.0

    struct CompositionNineGridBrush
    

    A brush that paints another brush stretched as a nine-grid (WinUI Microsoft.UI.Composition.CompositionNineGridBrush): the source is cut by its four insets into corners, edges and a centre; the corners keep their size (the insets times the inset scales), the edges stretch along one axis, the centre along both.

    The source is a colour or gradient brush (the nine regions of the area are filled with it, the frame only when the centre is hollow) or a CompositionSurfaceBrush, whose surface is cut at its natural size: the insets are in the units of the natural size of the surface. The insets and inset scales are animatable.

    Deviation (winui-composition.md): the stretch, alignment and transform of a surface brush source are not applied; its surface is cut as it is.

    View source

    Members

    left_inset

    fn left_inset(self: &Self) -> f32
    

    The width of the left column of the source (animatable as LeftInset).

    Source

    set_left_inset

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

    Source

    top_inset

    fn top_inset(self: &Self) -> f32
    

    The height of the top row of the source (animatable as TopInset).

    Source

    set_top_inset

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

    Source

    right_inset

    fn right_inset(self: &Self) -> f32
    

    The width of the right column of the source (animatable as RightInset).

    Source

    set_right_inset

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

    Source

    bottom_inset

    fn bottom_inset(self: &Self) -> f32
    

    The height of the bottom row of the source (animatable as BottomInset).

    Source

    set_bottom_inset

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

    Source

    left_inset_scale

    fn left_inset_scale(self: &Self) -> f32
    

    The scale of the left inset in the painted area (default 1; animatable as LeftInsetScale).

    Source

    set_left_inset_scale

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

    Source

    top_inset_scale

    fn top_inset_scale(self: &Self) -> f32
    

    The scale of the top inset in the painted area (default 1).

    Source

    set_top_inset_scale

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

    Source

    right_inset_scale

    fn right_inset_scale(self: &Self) -> f32
    

    The scale of the right inset in the painted area (default 1).

    Source

    set_right_inset_scale

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

    Source

    bottom_inset_scale

    fn bottom_inset_scale(self: &Self) -> f32
    

    The scale of the bottom inset in the painted area (default 1).

    Source

    set_bottom_inset_scale

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

    Source

    from_brush

    fn from_brush(brush: &Rc<CompositionBrush>) -> Option<CompositionNineGridBrush>
    

    The handle of brush as a nine-grid brush, if it is one.

    Source

    source

    fn source(self: &Self) -> Option<Rc<CompositionBrush>>
    

    The brush that is cut into nine regions.

    Source

    set_source

    fn set_source(self: &Self, value: Option<Rc<CompositionBrush>>)
    

    Source

    is_center_hollow

    fn is_center_hollow(self: &Self) -> bool
    

    Whether the centre region is left unpainted.

    Source

    set_is_center_hollow

    fn set_is_center_hollow(self: &Self, value: bool)
    

    Source

    set_insets

    fn set_insets(self: &Self, inset: f32)
    

    SetInsets(inset): the four insets.

    Source

    set_insets_with

    fn set_insets_with(self: &Self, left: f32, top: f32, right: f32, bottom: f32)
    

    SetInsets(left, top, right, bottom).

    Source

    set_inset_scales

    fn set_inset_scales(self: &Self, scale: f32)
    

    SetInsetScales(scale): the four inset scales.

    Source

    set_inset_scales_with

    fn set_inset_scales_with(self: &Self, left: f32, top: f32, right: f32, bottom: f32)
    

    SetInsetScales(left, top, right, bottom).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Receiver
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Deref

    Availability

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