PreparedTextMetrics
struct · ferroui-pretext-layout · v0.5.0
struct PreparedTextMetrics
Sizing helpers that reuse preparation without constructing line strings.
Members
measure_max_line_width
fn measure_max_line_width(prepared: &PreparedTextWithSegments) -> f64
collect_wrap_metrics
fn collect_wrap_metrics(prepared: &PreparedTextWithSegments, max_width: f64, line_height: f64) -> WrapMetrics
find_tight_wrap_metrics
fn find_tight_wrap_metrics(prepared: &PreparedTextWithSegments, max_width: f64, line_height: f64) -> Result<WrapMetrics, LayoutError>
Find the smallest integral width with no more lines than max_width.
Width is bounded to the exactly representable integer range of f64 so
binary search makes strict progress, including very large user inputs.
is_end
fn is_end(prepared: &PreparedTextWithSegments, cursor: LayoutCursor) -> bool
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.