[][src]Struct kas::text::MarkerPos

pub struct MarkerPos {
    pub pos: Vec2,
    pub ascent: f32,
    pub descent: f32,
    // some fields omitted
}

Used to return the position of a glyph with associated metrics

Fields

pos: Vec2

(x, y) coordinate of glyph

ascent: f32

Ascent (subtract from y to get top)

descent: f32

Descent (subtract from y to get bottom)

Implementations

impl MarkerPos[src]

pub fn embedding_level(&self) -> u8[src]

Returns the embedding level

According to Unicode Technical Report #9, the embedding level is guaranteed to be between 0 and 125 (inclusive), with a default level of zero and where odd levels are right-to-left.

pub fn is_ltr(&self) -> bool[src]

Returns true if the cursor is left-to-right

pub fn is_rtl(&self) -> bool[src]

Returns true if the cursor is right-to-left

Trait Implementations

impl Clone for MarkerPos[src]

impl Copy for MarkerPos[src]

impl Debug for MarkerPos[src]

impl Default for MarkerPos[src]

impl PartialEq<MarkerPos> for MarkerPos[src]

impl StructuralPartialEq for MarkerPos[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.