Struct footile::Plotter

source ·
pub struct Plotter { /* private fields */ }
Expand description

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.

Example

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)
                       .close().build();
let mut p = Plotter::new(100, 100);
p.stroke(&path);

Implementations

Create a new plotter.

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

Get width in pixels.

Get height in pixels.

Clear the mask.

Set tolerance threshold for curve decomposition.

Set the transform.

Set stroke join style.

  • js Join style.

Fill path onto the mask.

  • ops PathOp iterator.
  • rule Fill rule.

Stroke path onto the mask.

  • ops PathOp iterator.

Get the mask.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.