pub fn text_constraint(min_size: Val, size: Val, max_size: Val, scale_factor: f64) -> f32 {
    // Needs support for percentages
    match (min_size, size, max_size) {
        (_, _, Val::Px(max)) => scale_value(max, scale_factor),
        (Val::Px(min), _, _) => scale_value(min, scale_factor),
        (Val::Undefined, Val::Px(size), Val::Undefined) => scale_value(size, scale_factor),
        (Val::Auto, Val::Px(size), Val::Auto) => scale_value(size, scale_factor),
        _ => f32::MAX,
    }
}
/// Defines how min_size, size, and max_size affects the bounds of a text
/// block.
Defines how min_size, size, and max_size affects the bounds of a text
block.
Defines how min_size size and max_size affects the bounds of a text block .
pub fn text_constraint(min_size: Val, size: Val, max_size: Val, scale_factor: f64) -> f32 {
    // Needs support for percentages
    match (min_size, size, max_size) {
        (_, _, Val::Px(max)) => scale_value(max, scale_factor),
        (Val::Px(min), _, _) => scale_value(min, scale_factor),
        (Val::Undefined, Val::Px(size), Val::Undefined) => scale_value(size, scale_factor),
        (Val::Auto, Val::Px(size), Val::Auto) => scale_value(size, scale_factor),
        _ => f32::MAX,
    }
}
pub fn text_constraint ( min_size : Val , size : Val , max_size : Val , scale_factor : f64 ) -> f32 { // Needs support for percentages match ( min_size , size , max_size ) { ( _ , _ , Val :: Px ( max ) ) => scale_value ( max , scale_factor ) , ( Val :: Px ( min ) , _ , _ ) => scale_value ( min , scale_factor ) , ( Val :: Undefined , Val :: Px ( size ) , Val :: Undefined ) => scale_value ( size , scale_factor ) , ( Val :: Auto , Val :: Px ( size ) , Val :: Auto ) => scale_value ( size , scale_factor ) , _ => f32 :: MAX , } }
Defines how min_size, size, and max_size affects the bounds of a text
block.
Defines how min_size size and max_size affects the bounds of a text block .
min_size
Val
size
Val
max_size
Val
scale_factor
f64
min_size
Val
size
Val
max_size
Val
scale_factor
f64