Struct ochre::Rasterizer[][src]

pub struct Rasterizer { /* fields omitted */ }

Rasterizes paths.

Implementations

impl Rasterizer[src]

pub fn new() -> Rasterizer[src]

Initializes a new rasterizer.

pub fn move_to(&mut self, point: Vec2)[src]

Begins a new path component starting at the given location.

pub fn line_to(&mut self, point: Vec2)[src]

Adds a line segment to be rasterized.

pub fn command(&mut self, command: PathCmd)[src]

Adds a PathCmd to be rasterized.

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

Adds a path to be rasterized as a filled region, applying the given transform.

pub fn stroke(&mut self, path: &[PathCmd], width: f32, transform: Transform)[src]

Adds a path to be rasterized as a stroke with the given width, applying the given transform.

pub fn finish<B: TileBuilder>(mut self: Self, builder: &mut B)[src]

Rasterizes the accumulated path data, passing the results to the given TileBuilder. Consumes the rasterizer.

The path is rasterized to a set of 8×8 alpha mask tiles and n×8 solid interior spans.

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, 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.