pub struct LayoutInput<'a> {
pub text: &'a str,
pub spans: &'a [ShapingSpan<'a>],
pub paragraph: &'a ParagraphStyle,
pub lengths: ParagraphLengths,
pub min_width: f32,
pub max_width: f32,
pub options: TextLayoutOptions,
}Expand description
A paragraph to lay out and how.
Fields§
§text: &'a strThe text.
spans: &'a [ShapingSpan<'a>]The spans of the text, covering it in order with no gap.
paragraph: &'a ParagraphStyleThe paragraph settings: direction, alignment and line height style.
lengths: ParagraphLengthsThe paragraph’s lengths in pixels.
min_width: f32The narrowest the paragraph may be, in pixels.
max_width: f32The widest the paragraph may be, in pixels; infinite for lines that end only at line breaks. As Compose sizes a paragraph, it takes its max intrinsic width rounded up to whole device pixels, within these two, and the widest only when they are equal; its lines wrap at that width when they soft wrap, and ellipses cut to it.
options: TextLayoutOptionsSoft wrapping, the line limits and what shows where text overflows.
Trait Implementations§
Source§impl<'a> Clone for LayoutInput<'a>
impl<'a> Clone for LayoutInput<'a>
Auto Trait Implementations§
impl<'a> Forget for LayoutInput<'a>
impl<'a> Freeze for LayoutInput<'a>
impl<'a> Move for LayoutInput<'a>
impl<'a> RefUnwindSafe for LayoutInput<'a>
impl<'a> Send for LayoutInput<'a>
impl<'a> Sync for LayoutInput<'a>
impl<'a> Unpin for LayoutInput<'a>
impl<'a> UnsafeUnpin for LayoutInput<'a>
impl<'a> UnwindSafe for LayoutInput<'a>
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
Mutably borrows from an owned value. Read more