[][src]Struct footile::Plotter

pub struct Plotter { /* fields omitted */ }

Plotter for 2D vector paths.

This is a software vector rasterizer featuring anti-aliasing. Paths can be created using PathBuilder. The plotter contains a Mask of the current plot, which is affected by fill and stroke calls.


use footile::{PathBuilder,Plotter};
let path = PathBuilder::new().pen_width(3.0)
                       .move_to(50.0, 34.0)
                       .cubic_to(4.0, 16.0, 16.0, 28.0, 0.0, 32.0)
                       .cubic_to(-16.0, -4.0, -4.0, -16.0, 0.0, -32.0)
let mut p = Plotter::new(100, 100);


impl Plotter[src]

pub fn new(width: u32, height: u32) -> Plotter[src]

Create a new plotter.

  • width Width in pixels.
  • height Height in pixels.

pub fn width(&self) -> u32[src]

Get width in pixels.

pub fn height(&self) -> u32[src]

Get height in pixels.

pub fn clear_mask(&mut self) -> &mut Self[src]

Clear the mask.

pub fn set_tolerance(&mut self, t: f32) -> &mut Self[src]

Set tolerance threshold for curve decomposition.

pub fn set_transform(&mut self, t: Transform) -> &mut Self[src]

Set the transform.

pub fn set_join(&mut self, js: JoinStyle) -> &mut Self[src]

Set stroke join style.

  • js Join style.

pub fn fill<'a, T>(&mut self, ops: T, rule: FillRule) -> &mut Mask where
    T: IntoIterator<Item = &'a PathOp>, 

Fill path onto the mask.

  • ops PathOp iterator.
  • rule Fill rule.

pub fn stroke<'a, T>(&mut self, ops: T) -> &mut Mask where
    T: IntoIterator<Item = &'a PathOp>, 

Stroke path onto the mask.

  • ops PathOp iterator.

pub fn mask(&mut self) -> &mut Mask[src]

Get the mask.

Auto Trait Implementations

impl Send for Plotter

impl Sync for Plotter

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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