pub struct TexturePackerConfig {
pub max_width: u32,
pub max_height: u32,
pub allow_rotation: bool,
pub force_max_dimensions: bool,
pub border_padding: u32,
pub texture_padding: u32,
pub texture_extrusion: u32,
pub trim: bool,
pub texture_outlines: bool,
}Expand description
Configuration for a texture packer.
Fields§
§max_width: u32Max width of the packed image. Default value is 1024.
max_height: u32Max height of the packed image. Default value is 1024.
allow_rotation: boolTrue to allow rotation of the input images. Default value is true. Images rotated will be
rotated 90 degrees clockwise.
force_max_dimensions: boolIf enabled, the size of the output texture will always match [max_width] and [max_height] leaving potentially much unused space on the texture.
border_padding: u32Size of the padding on the outer edge of the packed image in pixel. Default value is 0.
texture_padding: u32Size of the padding between frames in pixel. Default value is 2
texture_extrusion: u32Size of the repeated pixels at the border of each image. Default value is 0.
trim: boolTrue to trim the empty pixels of the input images. Default value is true.
texture_outlines: boolTrue to draw the red line on the edge of the each frames. Useful for debugging. Default
value is false.
Trait Implementations§
Source§impl Clone for TexturePackerConfig
impl Clone for TexturePackerConfig
Source§fn clone(&self) -> TexturePackerConfig
fn clone(&self) -> TexturePackerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more