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.
use footile::{PathBuilder,Plotter};
let path = PathBuilder::new()
.move_to(10.0, 10.0)
.line_to(90.0, 90.0)
.build();
let mut p = Plotter::new(100, 100);
let mask = p.stroke(&path);
Write the mask to a PGM (portable gray map) file.
filename
Name of file to write.
Write the mask to a PNG (portable network graphics) file.
filename
Name of file to write.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static