fast image operations
| -rw-r--r-- | Cargo.toml | 5 | ||||
| -rw-r--r-- | benches/drawing.rs | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -22,6 +22,11 @@ path = "benches/overlays.rs" harness = false [[bench]] +name = "drawing" +path = "benches/drawing.rs" +harness = false + +[[bench]] name = "affine_transformations" path = "benches/affine_transformations.rs" harness = false 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); |