pub struct CompositionNineGridBrush(/* private fields */);Expand description
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.
Implementations§
Source§impl CompositionNineGridBrush
impl CompositionNineGridBrush
Sourcepub fn left_inset(&self) -> f32
pub fn left_inset(&self) -> f32
The width of the left column of the source (animatable as
LeftInset).
pub fn set_left_inset(&self, value: f32)
Sourcepub fn top_inset(&self) -> f32
pub fn top_inset(&self) -> f32
The height of the top row of the source (animatable as TopInset).
pub fn set_top_inset(&self, value: f32)
Sourcepub fn right_inset(&self) -> f32
pub fn right_inset(&self) -> f32
The width of the right column of the source (animatable as
RightInset).
pub fn set_right_inset(&self, value: f32)
Sourcepub fn bottom_inset(&self) -> f32
pub fn bottom_inset(&self) -> f32
The height of the bottom row of the source (animatable as
BottomInset).
pub fn set_bottom_inset(&self, value: f32)
Sourcepub fn left_inset_scale(&self) -> f32
pub fn left_inset_scale(&self) -> f32
The scale of the left inset in the painted area (default 1;
animatable as LeftInsetScale).
pub fn set_left_inset_scale(&self, value: f32)
Sourcepub fn top_inset_scale(&self) -> f32
pub fn top_inset_scale(&self) -> f32
The scale of the top inset in the painted area (default 1).
pub fn set_top_inset_scale(&self, value: f32)
Sourcepub fn right_inset_scale(&self) -> f32
pub fn right_inset_scale(&self) -> f32
The scale of the right inset in the painted area (default 1).
pub fn set_right_inset_scale(&self, value: f32)
Sourcepub fn bottom_inset_scale(&self) -> f32
pub fn bottom_inset_scale(&self) -> f32
The scale of the bottom inset in the painted area (default 1).
pub fn set_bottom_inset_scale(&self, value: f32)
Source§impl CompositionNineGridBrush
impl CompositionNineGridBrush
Sourcepub fn from_brush(
brush: &Rc<CompositionBrush>,
) -> Option<CompositionNineGridBrush>
pub fn from_brush( brush: &Rc<CompositionBrush>, ) -> Option<CompositionNineGridBrush>
The handle of brush as a nine-grid brush, if it is one.
Sourcepub fn props(&self) -> &CompositionNineGridBrushProps
pub fn props(&self) -> &CompositionNineGridBrushProps
The generated properties of the brush.
Sourcepub fn source(&self) -> Option<Rc<CompositionBrush>>
pub fn source(&self) -> Option<Rc<CompositionBrush>>
The brush that is cut into nine regions.
pub fn set_source(&self, value: Option<Rc<CompositionBrush>>)
Sourcepub fn is_center_hollow(&self) -> bool
pub fn is_center_hollow(&self) -> bool
Whether the centre region is left unpainted.
pub fn set_is_center_hollow(&self, value: bool)
Sourcepub fn set_insets(&self, inset: f32)
pub fn set_insets(&self, inset: f32)
SetInsets(inset): the four insets.
Sourcepub fn set_insets_with(&self, left: f32, top: f32, right: f32, bottom: f32)
pub fn set_insets_with(&self, left: f32, top: f32, right: f32, bottom: f32)
SetInsets(left, top, right, bottom).
Sourcepub fn set_inset_scales(&self, scale: f32)
pub fn set_inset_scales(&self, scale: f32)
SetInsetScales(scale): the four inset scales.
Trait Implementations§
Source§impl Clone for CompositionNineGridBrush
impl Clone for CompositionNineGridBrush
Source§impl Deref for CompositionNineGridBrush
impl Deref for CompositionNineGridBrush
Source§type Target = Rc<CompositionBrush>
type Target = Rc<CompositionBrush>
Source§fn deref(&self) -> &Rc<CompositionBrush>
fn deref(&self) -> &Rc<CompositionBrush>
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionNineGridBrush
impl !Send for CompositionNineGridBrush
impl !Sync for CompositionNineGridBrush
impl !UnwindSafe for CompositionNineGridBrush
impl Freeze for CompositionNineGridBrush
impl Unpin for CompositionNineGridBrush
impl UnsafeUnpin for CompositionNineGridBrush
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more