pub struct ShapedText { /* private fields */ }Expand description
Text shaped once (TextRasterizer::shape) so lines can be broken at any width without
reshaping.
Implementations§
Source§impl ShapedText
impl ShapedText
Sourcepub fn min_content_width(&self) -> f32
pub fn min_content_width(&self) -> f32
CSS min-content width: the widest unbreakable run.
Sourcepub fn max_content_width(&self) -> f32
pub fn max_content_width(&self) -> f32
CSS max-content width: the widest unwrapped paragraph.
Sourcepub fn lines_at(&self, max_width: f32) -> LineMetrics
pub fn lines_at(&self, max_width: f32) -> LineMetrics
Lines at max_width; 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