Struct footile::Plotter [] [src]

pub struct Plotter { /* fields omitted */ }

Plotter for rasterizing vector paths.

Paths are made from lines and splines (quadratic or cubic).

Example

use footile::PlotterBuilder;
let mut p = PlotterBuilder::new().build();
p.pen_width(3f32, false)
 .move_to(50f32, 34f32)
 .cubic_to(4f32, 16f32, 16f32, 28f32, 0f32, 32f32)
 .cubic_to(-16f32, -4f32, -4f32, -16f32, 0f32, -32f32)
 .close()
 .stroke();

Methods

impl Plotter
[src]

[src]

Get width in pixels.

[src]

Get height in pixels.

[src]

Reset path and lift pen.

[src]

Clear the mask.

[src]

Close current sub-path and lift the pen.

[src]

Set pen stroke width.

All subsequent path points will be affected, until the stroke width is changed again.

  • width Pen stroke width.
  • pixels Use pixel units (true), or user units (false).

[src]

Set stroke join style.

  • js Join style.

[src]

Move pen to a point and lower it.

  • bx X-position of point.
  • by Y-position of point.

[src]

Add a line from pen to a point.

If pen is lifted, nothing is added.

  • bx X-position of end point.
  • by Y-position of end point.

[src]

Add a quadratic bézier spline.

The points are A (current pen position), B (control point), and C (spline end point).

If pen is lifted, nothing is added.

  • bx X-position of control point.
  • by Y-position of control point.
  • cx X-position of end point.
  • cy Y-position of end point.

[src]

Add a cubic bézier spline.

The points are A (current pen position), B (first control point), C (second control point) and D (spline end point).

If pen is lifted, nothing is added.

  • bx X-position of first control point.
  • by Y-position of first control point.
  • cx X-position of second control point.
  • cy Y-position of second control point.
  • dx X-position of end point.
  • dy Y-position of end point.

[src]

Fill path onto the mask. The path is not affected.

  • rule Fill rule.

[src]

Stroke path onto the mask. The path is not affected.

[src]

Get the mask.