FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PreparedTextMetrics

    struct · ferroui-pretext-layout · v0.5.0

    struct PreparedTextMetrics
    

    Sizing helpers that reuse preparation without constructing line strings.

    View source

    Members

    measure_max_line_width

    fn measure_max_line_width(prepared: &PreparedTextWithSegments) -> f64
    

    Source

    collect_wrap_metrics

    fn collect_wrap_metrics(prepared: &PreparedTextWithSegments, max_width: f64, line_height: f64) -> WrapMetrics
    

    Source

    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.

    Source

    is_end

    fn is_end(prepared: &PreparedTextWithSegments, cursor: LayoutCursor) -> bool
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.