pub fn point_for_text_position(&self, text_pos: usize) -> Point {
        self.layout
            .as_ref()
            .map(|layout| layout.hit_test_text_position(text_pos).point)
            .unwrap_or_default()
    }
/// Given the utf-8 position of a character boundary in the underlying text,
/// return the `Point` (relative to this object's origin) representing the
/// boundary of the containing grapheme.
///
/// # Panics
///
/// Panics if `text_pos` is not a character boundary.
Given the utf-8 position of a character boundary in the underlying text,
return the `Point` (relative to this object's origin) representing the
boundary of the containing grapheme.
Given the utf - 8 position of a character boundary in the underlying text return the ` Point ` ( relative to this object ' s origin ) representing the boundary of the containing grapheme .
pub fn point_for_text_position(&self, text_pos: usize) -> Point {
        self.layout
            .as_ref()
            .map(|layout| layout.hit_test_text_position(text_pos).point)
            .unwrap_or_default()
    }
pub fn point_for_text_position ( & self , text_pos : usize ) -> Point { self . layout . as_ref ( ) . map ( | layout | layout . hit_test_text_position ( text_pos ) . point ) . unwrap_or_default ( ) }
Given the utf-8 position of a character boundary in the underlying text,
return the `Point` (relative to this object's origin) representing the
boundary of the containing grapheme.
Given the utf - 8 position of a character boundary in the underlying text return the ` Point ` ( relative to this object ' s origin ) representing the boundary of the containing grapheme .
&self
text_pos
usize
&self
text_pos
usize
panics
Panics if `text_pos` is not a character boundary.
Panics if ` text_pos ` is not a character boundary .