Struct Edge

Source
pub(crate) struct Edge {
    pub fpos: i16,
    pub opos: i32,
    pub pos: i32,
    pub flags: u8,
    pub dir: Direction,
    pub blue_edge: Option<ScaledWidth>,
    pub link_ix: Option<u16>,
    pub serif_ix: Option<u16>,
    pub scale: i32,
    pub first_ix: u16,
    pub last_ix: u16,
}
Expand description

Fields§

§fpos: i16

Original, unscaled position in font units.

§opos: i32

Original, scaled position.

§pos: i32

Current position.

§flags: u8

Edge flags.

§dir: Direction

Edge direction.

§blue_edge: Option<ScaledWidth>

Present if this is a blue edge.

§link_ix: Option<u16>

Index of linked edge.

§serif_ix: Option<u16>

Index of primary edge for serif.

§scale: i32

Used to speed up edge interpolation.

§first_ix: u16

Index of first segment in edge.

§last_ix: u16

Index of last segment in edge.

Implementations§

Source§

impl Edge

Edge flags.

Source

pub const NORMAL: u8 = 0u8

Source

pub const ROUND: u8 = 1u8

Source

pub const SERIF: u8 = 2u8

Source

pub const DONE: u8 = 4u8

Source

pub const NEUTRAL: u8 = 8u8

Source§

impl Edge

Source

pub fn serif<'a>(&self, edges: &'a [Edge]) -> Option<&'a Edge>

Trait Implementations§

Source§

impl Clone for Edge

Source§

fn clone(&self) -> Edge

Returns a duplicate 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 Edge

Source§

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

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

impl Default for Edge

Source§

fn default() -> Edge

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Edge

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Edge

Source§

impl Eq for Edge

Source§

impl StructuralPartialEq for Edge

Auto Trait Implementations§

§

impl Freeze for Edge

§

impl RefUnwindSafe for Edge

§

impl Send for Edge

§

impl Sync for Edge

§

impl Unpin for Edge

§

impl UnwindSafe for Edge

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.