pub fn text_position_for_point(&self, point: Point) -> usize {
        self.layout
            .as_ref()
            .map(|layout| layout.hit_test_point(point).idx)
            .unwrap_or_default()
    }
/// For a given `Point` (relative to this object's origin), returns index
/// into the underlying text of the nearest grapheme boundary.
For a given `Point` (relative to this object's origin), returns index
into the underlying text of the nearest grapheme boundary.
For a given ` Point ` ( relative to this object ' s origin ) returns index into the underlying text of the nearest grapheme boundary .
pub fn text_position_for_point(&self, point: Point) -> usize {
        self.layout
            .as_ref()
            .map(|layout| layout.hit_test_point(point).idx)
            .unwrap_or_default()
    }
pub fn text_position_for_point ( & self , point : Point ) -> usize { self . layout . as_ref ( ) . map ( | layout | layout . hit_test_point ( point ) . idx ) . unwrap_or_default ( ) }
For a given `Point` (relative to this object's origin), returns index
into the underlying text of the nearest grapheme boundary.
For a given ` Point ` ( relative to this object ' s origin ) returns index into the underlying text of the nearest grapheme boundary .
&self
point
Point
&self
point
Point