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::{PathBuilder, Plotter};
let path = PathBuilder::new()
                       .move_to(10f32, 10f32)
                       .line_to(90f32, 90f32)
                       .build();
let mut p = Plotter::new(100, 100);
p.add_path(path);
p.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.