pub struct ClusterReport {
pub bytes: Range<usize>,
pub run: Option<usize>,
pub word: Option<u32>,
pub line: u32,
pub space: bool,
pub ellipsis: bool,
pub font_size: f32,
pub baseline: f32,
pub cluster_box: CanvasRect,
pub ink: Option<CanvasRect>,
}Expand description
One cluster of a TextLayoutReport.
Fields§
§bytes: Range<usize>Its UTF-8 byte range in the text; the ellipsis has an empty one, at the cut.
run: Option<usize>The run holding its first byte, None for a plain string.
word: Option<u32>Its word, None for spaces, punctuation and the ellipsis.
line: u32Its line.
space: boolWhether it holds only white space.
ellipsis: boolWhether it is the ellipsis of a clamped text.
font_size: f32Its size, a fraction of the canvas’s shorter side.
baseline: f32Its line’s baseline, a fraction of the canvas height.
cluster_box: CanvasRectIts advance by its own em box.
ink: Option<CanvasRect>The bounds of what it draws, strokes included, at most a pixel loose; None when it
draws nothing.
Trait Implementations§
Source§impl Clone for ClusterReport
impl Clone for ClusterReport
Source§impl Debug for ClusterReport
impl Debug for ClusterReport
Source§impl PartialEq for ClusterReport
impl PartialEq for ClusterReport
impl StructuralPartialEq for ClusterReport
Auto Trait Implementations§
impl Forget for ClusterReport
impl Freeze for ClusterReport
impl Move for ClusterReport
impl RefUnwindSafe for ClusterReport
impl Send for ClusterReport
impl Sync for ClusterReport
impl Unpin for ClusterReport
impl UnsafeUnpin for ClusterReport
impl UnwindSafe for ClusterReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more