Struct footile::Mask [] [src]

pub struct Mask { /* fields omitted */ }

A Mask is an image with only an 8-bit alpha channel.

It can be obtained from a Plotter after plotting. A Raster can be composited with a Mask.

Example

use footile::PlotterBuilder;
let mut p = PlotterBuilder::new().build();
p.move_to(10f32, 10f32)
 .line_to(90f32, 90f32)
 .stroke();
let m = p.mask();

Methods

impl Mask
[src]

[src]

Write the mask to a PGM (portable gray map) file.

  • filename Name of file to write.

[src]

Write the mask to a PNG (portable network graphics) file.

  • filename Name of file to write.