Trait PointCoord

Source
pub trait PointCoord:
    Copy
    + Default
    + AnyBitPattern
    + PartialEq
    + PartialOrd
    + Add<Output = Self>
    + AddAssign
    + Sub<Output = Self>
    + Div<Output = Self>
    + Mul<Output = Self>
    + MulAssign {
    // Required methods
    fn from_fixed(x: Fixed) -> Self;
    fn from_i32(x: i32) -> Self;
    fn to_f32(self) -> f32;
    fn midpoint(self, other: Self) -> Self;
}
Expand description

Trait for types that are usable for TrueType point coordinates.

Required Methods§

Source

fn from_fixed(x: Fixed) -> Self

Source

fn from_i32(x: i32) -> Self

Source

fn to_f32(self) -> f32

Source

fn midpoint(self, other: Self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PointCoord for f32

Source§

fn from_fixed(x: Fixed) -> f32

Source§

fn from_i32(x: i32) -> f32

Source§

fn to_f32(self) -> f32

Source§

fn midpoint(self, other: f32) -> f32

Source§

impl PointCoord for i32

Source§

fn from_fixed(x: Fixed) -> i32

Source§

fn from_i32(x: i32) -> i32

Source§

fn to_f32(self) -> f32

Source§

fn midpoint(self, other: i32) -> i32

Implementors§