pub struct Paragraph;
Implementations§
Source§impl Paragraph
impl Paragraph
pub fn max_width(&self) -> f32
pub fn height(&self) -> f32
pub fn min_intrinsic_width(&self) -> f32
pub fn max_intrinsic_width(&self) -> f32
pub fn alphabetic_baseline(&self) -> f32
pub fn ideographic_baseline(&self) -> f32
pub fn longest_line(&self) -> f32
pub fn did_exceed_max_lines(&self) -> bool
pub fn layout(&mut self, _width: f32)
pub fn paint(&self, _canvas: &Canvas, _p: impl Into<Point>)
Sourcepub fn get_rects_for_range(
&self,
_range: Range<usize>,
_rect_height_style: RectHeightStyle,
_rect_width_style: RectWidthStyle,
) -> Vec<TextBox>
pub fn get_rects_for_range( &self, _range: Range<usize>, _rect_height_style: RectHeightStyle, _rect_width_style: RectWidthStyle, ) -> Vec<TextBox>
Returns a vector of bounding boxes that enclose all text between start and end glyph indexes, including start and excluding end
pub fn get_rects_for_placeholders(&self) -> Vec<TextBox>
pub fn get_glyph_position_at_coordinate( &self, _p: impl Into<Point>, ) -> PositionWithAffinity
pub fn get_word_boundary(&self, _offset: u32) -> Range<usize>
pub fn get_line_metrics(&self) -> Vec<LineMetrics>
pub fn line_number(&self) -> usize
pub fn mark_dirty(&mut self)
pub fn unresolved_glyphs(&mut self) -> Option<usize>
pub fn get_line_number_at(&self, _code_unit_index: usize) -> Option<usize>
pub fn get_line_metrics_at(&self, _line_number: usize) -> Option<LineMetrics>
pub fn get_actual_text_range( &self, _line_number: usize, _include_spaces: bool, ) -> Range<usize>
pub fn get_glyph_cluster_at( &self, _code_unit_index: usize, ) -> Option<GlyphClusterInfo>
pub fn get_closest_glyph_cluster_at( &self, _d: impl Into<Point>, ) -> Option<GlyphClusterInfo>
pub fn get_font_at(&self, _code_unit_index: usize) -> Font
pub fn get_fonts(&self) -> Vec<FontInfo>
Auto Trait Implementations§
impl Freeze for Paragraph
impl RefUnwindSafe for Paragraph
impl Send for Paragraph
impl Sync for Paragraph
impl Unpin for Paragraph
impl UnwindSafe for Paragraph
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