pub struct CompositionNineGridBrush(/* private fields */);Expand description
A brush that stretches its source as a nine-grid: the four corners keep their size, the edges stretch along one axis, and the center stretches (or is left hollow) to fill the remaining space.
Implementations§
Source§impl CompositionNineGridBrush
impl CompositionNineGridBrush
Sourcepub fn set_insets(&self, left: f32, top: f32, right: f32, bottom: f32)
pub fn set_insets(&self, left: f32, top: f32, right: f32, bottom: f32)
Sets the left, top, right, and bottom inset widths, in DIPs.
Sourcepub fn set_center_hollow(&self, hollow: bool)
pub fn set_center_hollow(&self, hollow: bool)
Sets whether the center of the grid is left unpainted (hollow).
Sourcepub fn set_source(&self, brush: &impl Brush)
pub fn set_source(&self, brush: &impl Brush)
Sets the brush stretched across the nine-grid.
Trait Implementations§
Source§impl Brush for CompositionNineGridBrush
impl Brush for CompositionNineGridBrush
Source§fn as_brush(&self) -> CompositionBrush
fn as_brush(&self) -> CompositionBrush
Returns this brush as the shared
CompositionBrush base type.Source§impl Clone for CompositionNineGridBrush
impl Clone for CompositionNineGridBrush
Source§fn clone(&self) -> CompositionNineGridBrush
fn clone(&self) -> CompositionNineGridBrush
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompositionNineGridBrush
impl RefUnwindSafe for CompositionNineGridBrush
impl Send for CompositionNineGridBrush
impl Sync for CompositionNineGridBrush
impl Unpin for CompositionNineGridBrush
impl UnsafeUnpin for CompositionNineGridBrush
impl UnwindSafe 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
Mutably borrows from an owned value. Read more