pub trait ParagraphCursorExt {
// Required methods
fn measured_cursor_rect(
&self,
text: &str,
cursor_index: usize,
) -> Option<SkRect>;
fn cursor_rect(
&self,
text: &str,
cursor_index: usize,
text_align: TextAlign,
) -> SkRect;
fn cursor_index_at_point(&self, point: (f64, f64)) -> usize;
}Required Methods§
Sourcefn measured_cursor_rect(
&self,
text: &str,
cursor_index: usize,
) -> Option<SkRect>
fn measured_cursor_rect( &self, text: &str, cursor_index: usize, ) -> Option<SkRect>
Area of the character at cursor_index, if there is any.
Sourcefn cursor_rect(
&self,
text: &str,
cursor_index: usize,
text_align: TextAlign,
) -> SkRect
fn cursor_rect( &self, text: &str, cursor_index: usize, text_align: TextAlign, ) -> SkRect
Area of the character at cursor_index.
Sourcefn cursor_index_at_point(&self, point: (f64, f64)) -> usize
fn cursor_index_at_point(&self, point: (f64, f64)) -> usize
Cursor position at the given point.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".