Struct tiny_skia::ClipMask[][src]

pub struct ClipMask { /* fields omitted */ }

A clipping mask.

Unlike Skia, we’re using just a simple 8bit alpha mask. It’s way slower, but times easier to implement.

Implementations

impl ClipMask[src]

pub fn new() -> Self[src]

Creates a new, empty mask.

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

Checks that mask is empty.

pub fn set_path(
    &mut self,
    width: u32,
    height: u32,
    path: &Path,
    fill_rule: FillRule,
    anti_alias: bool
) -> Option<()>
[src]

Sets the current clipping path.

Not additive. Overwrites the previous data.

Path must be transformed beforehand.

pub fn intersect_path(
    &mut self,
    path: &Path,
    fill_rule: FillRule,
    anti_alias: bool
) -> Option<()>
[src]

Intersects the provided path with the current clipping path.

Path must be transformed beforehand.

pub fn clear(&mut self)[src]

Clears the mask.

Internal memory buffer is not deallocated.

Trait Implementations

impl Clone for ClipMask[src]

impl Debug for ClipMask[src]

impl Default for ClipMask[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.