Struct swash::scale::outline::Outline[][src]

pub struct Outline { /* fields omitted */ }

Scaled glyph outline represented as a collection of layers and a sequence of points and verbs.

Implementations

impl Outline[src]

pub fn new() -> Self[src]

Creates a new empty outline.

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

Returns true if the outline has color layers.

pub fn len(&self) -> usize[src]

Returns the number of layers in the outline.

pub fn get<'a>(&'a self, index: usize) -> Option<Layer<'a>>[src]

Returns a reference to the layer at the specified index.

pub fn get_mut<'a>(&'a mut self, index: usize) -> Option<LayerMut<'a>>[src]

Returns a mutable reference to the layer at the specified index.

pub fn points(&self) -> &[Point]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns a reference to the sequence of points in the outline.

pub fn points_mut(&mut self) -> &mut [Point]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns a mutable reference to the sequence of points in the outline.

pub fn verbs(&self) -> &[Verb]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns a reference to the sequence of verbs in the outline.

pub fn path(&self) -> impl PathData + '_[src]

Returns path data for the outline.

pub fn bounds(&self) -> Bounds[src]

Computes the bounding box of the outline.

pub fn transform(&mut self, transform: &Transform)[src]

Transforms the outline by the specified matrix.

pub fn embolden(&mut self, x_strength: f32, y_strength: f32)[src]

Applies a faux bold to the outline with the specified strengths in the x and y directions.

pub fn clear(&mut self)[src]

Clears the outline.

Trait Implementations

impl Clone for Outline[src]

impl Default for Outline[src]

Auto Trait Implementations

impl RefUnwindSafe for Outline

impl Send for Outline

impl Sync for Outline

impl Unpin for Outline

impl UnwindSafe for Outline

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.