pub struct Intrinsics {
pub min_content_width: f32,
pub max_content_width: f32,
pub height_at_max_content: f32,
pub baseline: Option<f32>,
}Expand description
What the host answers for one leaf: the width it needs with every line
break taken (min_content), with none (max_content), the height at
max_content width (one line for text) and the FIRST BASELINE from the
top of the border box (alignItems: baseline; it does not move with the
width: the first line stays the first line). None = no baseline (an
icon, a box): the bottom edge stands in, like CSS. Controls with a fixed
box return it in both widths.
Fields§
§min_content_width: f32§max_content_width: f32§height_at_max_content: f32§baseline: Option<f32>Implementations§
Source§impl Intrinsics
impl Intrinsics
Sourcepub fn sanitised(self) -> Intrinsics
pub fn sanitised(self) -> Intrinsics
R8 F53: a host measurer’s answer with every NaN or infinite number
replaced (0; a baseline that is not finite = none) and the widths
ordered (min_content_width <= max_content_width): the memo clamps
against them (f32::clamp panics on NaN) and taffy sizes by them.
Non-negative too: a negative width or height is 0.