[−][src]Struct egui::paint::font::Galley
A collection of text locked into place.
Fields
text: String
The full text
lines: Vec<Line>
Lines of text, from top to bottom. The number of chars in all lines sum up to text.chars().count()
size: Vec2
Implementations
impl Galley
[src]
pub fn sanity_check(&self)
[src]
pub fn char_start_pos(&self, char_idx: usize) -> Vec2
[src]
If given a char index after the first line, the end of the last character is returned instead. Returns a Vec2 rather than a Pos2 as this is an offset into the galley. shrug
pub fn char_at(&self, pos: Vec2) -> GalleyCursor
[src]
Character offset at the given position within the galley
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Galley
impl Send for Galley
impl Sync for Galley
impl Unpin for Galley
impl UnwindSafe for Galley
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>,