[−][src]Struct azul_text_layout::text_layout::WordPositions
Stores the positions of the vertically laid out texts
Fields
text_layout_options: ResolvedTextLayoutOptions
Options like word spacing, character spacing, etc. that were used to layout these glyphs
word_positions: Vec<LayoutPoint>
Stores the positions of words.
line_breaks: Vec<(usize, f32)>
Index of the word at which the line breaks + length of line (useful for text selection + horizontal centering)
trailing: f32
Horizontal width of the last line (in pixels), necessary for inline layout later on, so that the next text run can contine where the last text run left off.
Usually, the "trailing" of the current text block is the "leading" of the next text block, to make it seem like two text runs push into each other.
number_of_words: usize
How many words are in the text?
number_of_lines: usize
How many lines (NOTE: virtual lines, meaning line breaks in the layouted text) are there?
content_size: LayoutSize
Horizontal and vertical boundaries of the layouted words.
Note that the vertical extent can be larger than the last words' position, because of trailing negative glyph advances.
Trait Implementations
impl Clone for WordPositions
[src]
fn clone(&self) -> WordPositions
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WordPositions
[src]
impl PartialEq<WordPositions> for WordPositions
[src]
fn eq(&self, other: &WordPositions) -> bool
[src]
fn ne(&self, other: &WordPositions) -> bool
[src]
impl StructuralPartialEq for WordPositions
[src]
Auto Trait Implementations
impl RefUnwindSafe for WordPositions
impl Send for WordPositions
impl Sync for WordPositions
impl Unpin for WordPositions
impl UnwindSafe for WordPositions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,