diff --git a/Cargo.toml b/Cargo.toml index eaf4649..8a2d866 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,11 @@ name = "overlays" path = "benches/overlays.rs" harness = false +[[bench]] +name = "drawing" +path = "benches/drawing.rs" +harness = false + [[bench]] name = "affine_transformations" path = "benches/affine_transformations.rs" diff --git a/benches/drawing.rs b/benches/drawing.rs new file mode 100644 index 0000000..1ad9c97 --- /dev/null +++ b/benches/drawing.rs @@ -0,0 +1,7 @@ +use fimg::*; +fn tri() { + let mut b = [0u8; 1000 * 1000 * 4]; + let mut i = Image::<&mut [u8], 4>::build(1000, 1000).buf(&mut b); + i.tri((0., 0.), (1000., 500.), (0., 999.), [255, 255, 255, 255]); +} +iai::main!(tri);