Struct webrender_api::NinePatchBorder
source · pub struct NinePatchBorder {
pub source: NinePatchBorderSource,
pub width: i32,
pub height: i32,
pub slice: DeviceIntSideOffsets,
pub fill: bool,
pub repeat_horizontal: RepeatMode,
pub repeat_vertical: RepeatMode,
}
Fields§
§source: NinePatchBorderSource
Describes what to use as the 9-patch source image. If this is an image, it will be stretched to fill the size given by width x height.
width: i32
The width of the 9-part image.
height: i32
The height of the 9-part image.
slice: DeviceIntSideOffsets
Distances from each edge where the image should be sliced up. These values are in 9-part-image space (the same space as width and height), and the resulting image parts will be used to fill the corresponding parts of the border as given by the border widths. This can lead to stretching. Slices can be overlapping. In that case, the same pixels from the 9-part image will show up in multiple parts of the resulting border.
fill: bool
Controls whether the center of the 9 patch image is rendered or ignored. The center is never rendered if the slices are overlapping.
repeat_horizontal: RepeatMode
Determines what happens if the horizontal side parts of the 9-part image have a different size than the horizontal parts of the border.
repeat_vertical: RepeatMode
Determines what happens if the vertical side parts of the 9-part image have a different size than the vertical parts of the border.
Trait Implementations§
source§impl Clone for NinePatchBorder
impl Clone for NinePatchBorder
source§fn clone(&self) -> NinePatchBorder
fn clone(&self) -> NinePatchBorder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NinePatchBorder
impl Debug for NinePatchBorder
source§impl Default for NinePatchBorder
impl Default for NinePatchBorder
source§fn default() -> NinePatchBorder
fn default() -> NinePatchBorder
source§impl<'de> Deserialize<'de> for NinePatchBorder
impl<'de> Deserialize<'de> for NinePatchBorder
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for NinePatchBorder
impl PartialEq for NinePatchBorder
source§impl Peek for NinePatchBorder
impl Peek for NinePatchBorder
source§impl Poke for NinePatchBorder
impl Poke for NinePatchBorder
source§impl Serialize for NinePatchBorder
impl Serialize for NinePatchBorder
impl Copy for NinePatchBorder
impl StructuralPartialEq for NinePatchBorder
Auto Trait Implementations§
impl Freeze for NinePatchBorder
impl RefUnwindSafe for NinePatchBorder
impl Send for NinePatchBorder
impl Sync for NinePatchBorder
impl Unpin for NinePatchBorder
impl UnwindSafe for NinePatchBorder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)