pub struct ShapedText { /* private fields */ }Expand description
A request’s text shaped once, for layout: its lines at any wrapping
width, broken as TextRasterizer::rasterize breaks them, without
shaping again (TextRasterizer::shape).
Implementations§
Source§impl ShapedText
impl ShapedText
Sourcepub fn min_content_width(&self) -> f32
pub fn min_content_width(&self) -> f32
The widest run between line-break opportunities, trailing spaces left out (CSS min-content).
Sourcepub fn max_content_width(&self) -> f32
pub fn max_content_width(&self) -> f32
The widest paragraph unwrapped, trailing spaces left out (CSS max-content).
Sourcepub fn lines_at(&self, max_width: f32) -> LineMetrics
pub fn lines_at(&self, max_width: f32) -> LineMetrics
The lines at max_width, as TextRasterizer::rasterize breaks
them; a non-positive width does not wrap.
Trait Implementations§
Source§impl Clone for ShapedText
impl Clone for ShapedText
Auto Trait Implementations§
impl Freeze for ShapedText
impl RefUnwindSafe for ShapedText
impl Send for ShapedText
impl Sync for ShapedText
impl Unpin for ShapedText
impl UnsafeUnpin for ShapedText
impl UnwindSafe for ShapedText
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