Paragraph

Struct Paragraph 

Source
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: &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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.