pub struct PackerConfig {Show 26 fields
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 trim_threshold: u8,
pub texture_outlines: bool,
pub power_of_two: bool,
pub square: bool,
pub use_waste_map: bool,
pub family: AlgorithmFamily,
pub mr_heuristic: MaxRectsHeuristic,
pub skyline_heuristic: SkylineHeuristic,
pub g_choice: GuillotineChoice,
pub g_split: GuillotineSplit,
pub auto_mode: AutoMode,
pub sort_order: SortOrder,
pub time_budget_ms: Option<u64>,
pub parallel: bool,
pub mr_reference: bool,
pub auto_mr_ref_time_ms_threshold: Option<u64>,
pub auto_mr_ref_input_threshold: Option<usize>,
pub transparent_policy: TransparentPolicy,
}Fields§
§max_width: u32Maximum page width in pixels.
max_height: u32Maximum page height in pixels.
allow_rotation: boolAllow 90° rotations for placements where beneficial.
force_max_dimensions: boolForce final page dimensions to be exactly max_width/max_height.
border_padding: u32Pixels around entire page border.
texture_padding: u32Pixels between frames.
texture_extrusion: u32Extrude edge pixels of each frame (for sampling safety).
trim: boolTrim transparent borders (alpha <= trim_threshold).
trim_threshold: u8§texture_outlines: boolDraw red outlines on output pages (debug).
power_of_two: boolResize output page to power-of-two.
square: boolForce output page to be square (max(width,height)).
use_waste_map: boolUse waste map in Skyline to recover gaps
family: AlgorithmFamily§mr_heuristic: MaxRectsHeuristic§skyline_heuristic: SkylineHeuristic§g_choice: GuillotineChoice§g_split: GuillotineSplit§auto_mode: AutoMode§sort_order: SortOrder§time_budget_ms: Option<u64>Optional time budget for auto portfolio (milliseconds). None or 0 disables.
parallel: boolEnable parallel candidate evaluation when feature “parallel” is on.
mr_reference: boolUse reference-accurate MaxRects split/prune (SplitFreeNode + staged prune). When false, uses a simpler but correct split/prune that may create more intermediate free rects.
auto_mr_ref_time_ms_threshold: Option<u64>Auto-mode: enable mr_reference when time budget >= this (ms). None => use default heuristic.
auto_mr_ref_input_threshold: Option<usize>Auto-mode: enable mr_reference when inputs >= this count. None => use default heuristic.
transparent_policy: TransparentPolicyPolicy for fully transparent images (effective when trim=true).
Implementations§
Source§impl PackerConfig
impl PackerConfig
Source§impl PackerConfig
impl PackerConfig
Sourcepub fn builder() -> PackerConfigBuilder
pub fn builder() -> PackerConfigBuilder
Create a fluent builder for PackerConfig.
Trait Implementations§
Source§impl Clone for PackerConfig
impl Clone for PackerConfig
Source§fn clone(&self) -> PackerConfig
fn clone(&self) -> PackerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PackerConfig
impl Debug for PackerConfig
Source§impl Default for PackerConfig
impl Default for PackerConfig
Source§impl<'de> Deserialize<'de> for PackerConfig
impl<'de> Deserialize<'de> for PackerConfig
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>,
Auto Trait Implementations§
impl Freeze for PackerConfig
impl RefUnwindSafe for PackerConfig
impl Send for PackerConfig
impl Sync for PackerConfig
impl Unpin for PackerConfig
impl UnsafeUnpin for PackerConfig
impl UnwindSafe for PackerConfig
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().