wizdraw - tiny no_std crate to fill and stroke bezier curves (partially SIMD)
Features
f64: usef64s instead off32ssimd: use the SIMD version of thefillfunction
By default, this crate uses f32 and doesn't use SIMD.
Example
use CubicBezier2;
use Vec2;
// these coordinates correspond to pixels
let start = new;
let curve1 = CubicBezier2 ;
let curve2 = CubicBezier2 ;
let mut points = Vecnew;
// convert the curves to a path;
;
;
// close the loop
points.push;
// create a buffer to hold the mask
let mask_size = new;
let mut mask = vec!;
// if you want to fill the path:
// (SSAA = 4, squared = 16)
;
// or if you'd like to stroke the path:
// (SSAA = 4)
let stroke_width = 2.0;
;
Demo: PNG output
Check out the png_demo example to generate this image:
