mirror of
https://github.com/bend-n/fimg.git
synced 2024-12-22 18:38:21 -06:00
add tri bench
This commit is contained in:
parent
248bba7bb9
commit
101ca55d29
|
@ -21,6 +21,11 @@ name = "overlays"
|
||||||
path = "benches/overlays.rs"
|
path = "benches/overlays.rs"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
|
[[bench]]
|
||||||
|
name = "drawing"
|
||||||
|
path = "benches/drawing.rs"
|
||||||
|
harness = false
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "affine_transformations"
|
name = "affine_transformations"
|
||||||
path = "benches/affine_transformations.rs"
|
path = "benches/affine_transformations.rs"
|
||||||
|
|
7
benches/drawing.rs
Normal file
7
benches/drawing.rs
Normal 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);
|
Loading…
Reference in a new issue