add tri bench

This commit is contained in:
bendn 2023-10-04 07:50:20 +07:00
parent 248bba7bb9
commit 101ca55d29
No known key found for this signature in database
GPG key ID: 0D9D3A2A3B2A93D6
2 changed files with 12 additions and 0 deletions

View file

@ -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"

7
benches/drawing.rs Normal file
View file

@ -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);