fast image operations
Diffstat (limited to 'benches/drawing.rs')
| -rw-r--r-- | benches/drawing.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/benches/drawing.rs b/benches/drawing.rs index 1ad9c97..b0668d3 100644 --- a/benches/drawing.rs +++ b/benches/drawing.rs @@ -1,7 +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]); + let mut i: Image<_, 4> = fimg::make!(4 channels 1000 x 1000); + i.as_mut() + .tri((0., 0.), (1000., 500.), (0., 999.), [255, 255, 255, 255]); } iai::main!(tri); |