Struct druid::piet::CairoTextLayout
pub struct CairoTextLayout { /* private fields */ }
Trait Implementations§
§impl Clone for CairoTextLayout
impl Clone for CairoTextLayout
§fn clone(&self) -> CairoTextLayout
fn clone(&self) -> CairoTextLayout
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for CairoTextLayout
impl Debug for CairoTextLayout
§impl TextLayout for CairoTextLayout
impl TextLayout for CairoTextLayout
§fn trailing_whitespace_width(&self) -> f64
fn trailing_whitespace_width(&self) -> f64
The width of this layout, including the width of any trailing whitespace. Read more
§fn image_bounds(&self) -> Rect
fn image_bounds(&self) -> Rect
Returns a
Rect
representing the bounding box of the glyphs in this layout,
relative to the top-left of the layout object. Read more§fn line_text(&self, line_number: usize) -> Option<&str>
fn line_text(&self, line_number: usize) -> Option<&str>
Given a line number, return a reference to that line’s underlying string. Read more
§fn line_metric(&self, line_number: usize) -> Option<LineMetric>
fn line_metric(&self, line_number: usize) -> Option<LineMetric>
Given a line number, return a reference to that line’s metrics, if the line exists. Read more
§fn line_count(&self) -> usize
fn line_count(&self) -> usize
Returns total number of lines in the text layout. Read more
§fn hit_test_point(&self, point: Point) -> HitTestPoint
fn hit_test_point(&self, point: Point) -> HitTestPoint
§fn hit_test_text_position(&self, idx: usize) -> HitTestPosition
fn hit_test_text_position(&self, idx: usize) -> HitTestPosition
Given a grapheme boundary in the string used to create this
TextLayout
,
return a HitTestPosition
object describing the location of that boundary
within the layout. Read more§fn rects_for_range(&self, range: impl RangeBounds<usize>) -> Vec<Rect, Global> ⓘ
fn rects_for_range(&self, range: impl RangeBounds<usize>) -> Vec<Rect, Global> ⓘ
Auto Trait Implementations§
impl !RefUnwindSafe for CairoTextLayout
impl !Send for CairoTextLayout
impl !Sync for CairoTextLayout
impl Unpin for CairoTextLayout
impl !UnwindSafe for CairoTextLayout
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.