pub struct ClusterInfo {
pub bytes: Range<usize>,
pub line: u32,
pub word: Option<u32>,
pub is_space: bool,
pub x: f32,
pub advance: f32,
pub baseline: f32,
}Expand description
One cluster of a TextLayout.
Fields§
§bytes: Range<usize>Byte range in the request’s text.
line: u32Line index.
word: Option<u32>Index of its UAX #29 word, counting only words with a letter or digit; None for spaces
and punctuation between words.
is_space: boolWhether it holds only white space.
x: f32Start of its advance in pixels from the layout box’s left edge.
advance: f32Advance in pixels; zero for a space hanging at a line end.
baseline: f32Line baseline in pixels from the layout box’s top.
Trait Implementations§
Source§impl Clone for ClusterInfo
impl Clone for ClusterInfo
Source§impl Debug for ClusterInfo
impl Debug for ClusterInfo
Source§impl PartialEq for ClusterInfo
impl PartialEq for ClusterInfo
impl StructuralPartialEq for ClusterInfo
Auto Trait Implementations§
impl Freeze for ClusterInfo
impl RefUnwindSafe for ClusterInfo
impl Send for ClusterInfo
impl Sync for ClusterInfo
impl Unpin for ClusterInfo
impl UnsafeUnpin for ClusterInfo
impl UnwindSafe for ClusterInfo
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