Crate ab_glyph_rasterizer[−][src]
Coverage rasterization for lines, quadratic & cubic beziers. Useful for drawing .otf font glyphs.
use ab_glyph_rasterizer::Rasterizer; let mut rasterizer = Rasterizer::new(width, height); // draw outlines rasterizer.draw_line(l0, l1); rasterizer.draw_quad(q0, q1, q2); rasterizer.draw_cubic(c0, c1, c2, c3); // iterate over the resultant pixel alphas, e.g. save pixel to a buffer rasterizer.for_each_pixel(|index, alpha| { // ... });
Structs
Point | An (x, y) coordinate. |
Rasterizer | Coverage rasterizer for lines, quadratic & cubic beziers. |
Functions
point |
|