pub struct Paragraph;

Implementations§

source§

impl Paragraph

source

pub fn max_width(&self) -> f32

source

pub fn height(&self) -> f32

source

pub fn min_intrinsic_width(&self) -> f32

source

pub fn max_intrinsic_width(&self) -> f32

source

pub fn alphabetic_baseline(&self) -> f32

source

pub fn ideographic_baseline(&self) -> f32

source

pub fn longest_line(&self) -> f32

source

pub fn did_exceed_max_lines(&self) -> bool

source

pub fn layout(&mut self, _width: f32)

source

pub fn paint(&self, _canvas: &mut Canvas, _p: impl Into<Point>)

source

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

source

pub fn get_rects_for_placeholders(&self) -> Vec<TextBox>

source

pub fn get_glyph_position_at_coordinate( &self, _p: impl Into<Point> ) -> PositionWithAffinity

source

pub fn get_word_boundary(&self, _offset: u32) -> Range<usize>

source

pub fn get_line_metrics(&self) -> Vec<LineMetrics>

source

pub fn line_number(&self) -> usize

source

pub fn mark_dirty(&mut self)

source

pub fn unresolved_glyphs(&mut self) -> Option<usize>

source

pub fn get_line_number_at(&self, _code_unit_index: usize) -> Option<usize>

source

pub fn get_line_metrics_at(&self, _line_number: usize) -> Option<LineMetrics>

source

pub fn get_actual_text_range( &self, _line_number: usize, _include_spaces: bool ) -> Range<usize>

source

pub fn get_glyph_cluster_at( &self, _code_unit_index: usize ) -> Option<GlyphClusterInfo>

source

pub fn get_closest_glyph_cluster_at( &self, _d: impl Into<Point> ) -> Option<GlyphClusterInfo>

source

pub fn get_font_at(&self, _code_unit_index: usize) -> Font

source

pub fn get_fonts(&self) -> Vec<FontInfo>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.