TextureSlicer
TextureSlicer
- border : bevy_sprite::texture_slice::border_rect::BorderRect
- center_scale_mode : bevy_sprite::texture_slice::slicer::SliceScaleMode
- sides_scale_mode : bevy_sprite::texture_slice::slicer::SliceScaleMode
- max_corner_scale : f32
Description
Slices a texture using the 9-slicing technique. This allows to reuse an image at various sizes without needing to prepare multiple assets. The associated texture will be split into nine portions, so that on resize the different portions scale or tile in different ways to keep the texture in proportion.
For example, when resizing a 9-sliced texture the corners will remain unscaled while the other sections will be scaled or tiled.
See 9-sliced textures.