pub enum TextPos {
    Px(isize, isize),
    ColRow(usize, usize),
}

Variants§

§

Px(isize, isize)

§

ColRow(usize, usize)

See TextSize::get_max_characters for maximum x and y

Implementations§

source§

impl TextPos

source

pub fn to_coord(&self, size: TextSize) -> (isize, isize)

source

pub fn px<P: Into<Coord>>(coord: P) -> TextPos

Trait Implementations§

source§

impl Clone for TextPos

source§

fn clone(&self) -> TextPos

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TextPos

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl NewTextPos<f32> for TextPos

source§

fn cr((x, y): (f32, f32)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (f32, f32)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<f64> for TextPos

source§

fn cr((x, y): (f64, f64)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (f64, f64)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<i128> for TextPos

source§

fn cr((x, y): (i128, i128)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (i128, i128)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<i16> for TextPos

source§

fn cr((x, y): (i16, i16)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (i16, i16)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<i32> for TextPos

source§

fn cr((x, y): (i32, i32)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (i32, i32)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<i64> for TextPos

source§

fn cr((x, y): (i64, i64)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (i64, i64)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<i8> for TextPos

source§

fn cr((x, y): (i8, i8)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (i8, i8)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<isize> for TextPos

source§

fn cr((x, y): (isize, isize)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (isize, isize)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<u128> for TextPos

source§

fn cr((x, y): (u128, u128)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (u128, u128)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<u16> for TextPos

source§

fn cr((x, y): (u16, u16)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (u16, u16)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<u32> for TextPos

source§

fn cr((x, y): (u32, u32)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (u32, u32)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<u64> for TextPos

source§

fn cr((x, y): (u64, u64)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (u64, u64)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<u8> for TextPos

source§

fn cr((x, y): (u8, u8)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (u8, u8)) -> Self

Creates a new TextPos::Px
source§

impl NewTextPos<usize> for TextPos

source§

fn cr((x, y): (usize, usize)) -> Self

Calls abs() on x and y

source§

fn px((x, y): (usize, usize)) -> Self

Creates a new TextPos::Px
source§

impl PartialEq<TextPos> for TextPos

source§

fn eq(&self, other: &TextPos) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for TextPos

source§

impl Eq for TextPos

source§

impl StructuralEq for TextPos

source§

impl StructuralPartialEq for TextPos

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.