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.
Members
left_insetset_left_insettop_insetset_top_insetright_insetset_right_insetbottom_insetset_bottom_insetleft_inset_scaleset_left_inset_scaletop_inset_scaleset_top_inset_scaleright_inset_scaleset_right_inset_scalebottom_inset_scaleset_bottom_inset_scalefrom_brushsourceset_sourceis_center_hollowset_is_center_hollowset_insetsset_insets_withset_inset_scalesset_inset_scales_with
left_inset
fn left_inset(self: &Self) -> f32
The width of the left column of the source (animatable as
LeftInset).
set_left_inset
fn set_left_inset(self: &Self, value: f32)
top_inset
fn top_inset(self: &Self) -> f32
The height of the top row of the source (animatable as TopInset).
set_top_inset
fn set_top_inset(self: &Self, value: f32)
right_inset
fn right_inset(self: &Self) -> f32
The width of the right column of the source (animatable as
RightInset).
set_right_inset
fn set_right_inset(self: &Self, value: f32)
bottom_inset
fn bottom_inset(self: &Self) -> f32
The height of the bottom row of the source (animatable as
BottomInset).
set_bottom_inset
fn set_bottom_inset(self: &Self, value: f32)
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).
set_left_inset_scale
fn set_left_inset_scale(self: &Self, value: f32)
top_inset_scale
fn top_inset_scale(self: &Self) -> f32
The scale of the top inset in the painted area (default 1).
set_top_inset_scale
fn set_top_inset_scale(self: &Self, value: f32)
right_inset_scale
fn right_inset_scale(self: &Self) -> f32
The scale of the right inset in the painted area (default 1).
set_right_inset_scale
fn set_right_inset_scale(self: &Self, value: f32)
bottom_inset_scale
fn bottom_inset_scale(self: &Self) -> f32
The scale of the bottom inset in the painted area (default 1).
set_bottom_inset_scale
fn set_bottom_inset_scale(self: &Self, value: f32)
from_brush
fn from_brush(brush: &Rc<CompositionBrush>) -> Option<CompositionNineGridBrush>
The handle of brush as a nine-grid brush, if it is one.
source
fn source(self: &Self) -> Option<Rc<CompositionBrush>>
The brush that is cut into nine regions.
set_source
fn set_source(self: &Self, value: Option<Rc<CompositionBrush>>)
is_center_hollow
fn is_center_hollow(self: &Self) -> bool
Whether the centre region is left unpainted.
set_is_center_hollow
fn set_is_center_hollow(self: &Self, value: bool)
set_insets
fn set_insets(self: &Self, inset: f32)
SetInsets(inset): the four insets.
set_insets_with
fn set_insets_with(self: &Self, left: f32, top: f32, right: f32, bottom: f32)
SetInsets(left, top, right, bottom).
set_inset_scales
fn set_inset_scales(self: &Self, scale: f32)
SetInsetScales(scale): the four inset scales.
set_inset_scales_with
fn set_inset_scales_with(self: &Self, left: f32, top: f32, right: f32, bottom: f32)
SetInsetScales(left, top, right, bottom).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedErasedDestructorIntoEitherCloneDeref
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.