Information on how to slice a texture so that it can be stretched or squashed without distorting the borders.
This can be used with
Texture::draw_nine_slice to easily draw things like UI panels.
example demonstrates how to draw a
The region of the texture that should be used.
The offset of the border on the left side.
The offset of the border on the right side.
The offset of the border on the top side.
The offset of the border on the bottom side.
Creates a new nine slice configuration with the given offsets.
pub fn with_border(region: Rectangle, border: f32) -> NineSlice[src]
Creates a new nine slice configuration, using the same offset for all edges.
impl RefUnwindSafe for NineSlice
impl UnwindSafe for NineSlice
type Owned = T
The resulting type after obtaining ownership.
pub fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.