aboutsummaryrefslogtreecommitdiff
path: root/benches/benches/rasterizer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'benches/benches/rasterizer.rs')
-rw-r--r--benches/benches/rasterizer.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/benches/benches/rasterizer.rs b/benches/benches/rasterizer.rs
index 405acb1..736cd02 100644
--- a/benches/benches/rasterizer.rs
+++ b/benches/benches/rasterizer.rs
@@ -1,6 +1,7 @@
use criterion::{criterion_group, Criterion};
-use plotters::drawing::bitmap_pixel::BGRXPixel;
use plotters::prelude::*;
+use plotters_backend::BackendStyle;
+use plotters_bitmap::bitmap_pixel::BGRXPixel;
const W: u32 = 1000;
const H: u32 = 1000;
@@ -14,7 +15,7 @@ fn draw_pixel(c: &mut Criterion) {
let mut root = BitMapBackend::with_buffer(&mut buffer, (W, H));
for x in 0..W / 10 {
for y in 0..H / 10 {
- root.draw_pixel((x as i32, y as i32), &RGBColor(255, 0, 234).to_rgba())
+ root.draw_pixel((x as i32, y as i32), RGBColor(255, 0, 234).color())
.unwrap();
}
}
@@ -28,7 +29,7 @@ fn draw_pixel(c: &mut Criterion) {
BitMapBackend::<BGRXPixel>::with_buffer_and_format(&mut buffer, (W, H)).unwrap();
for x in 0..W / 10 {
for y in 0..H / 10 {
- root.draw_pixel((x as i32, y as i32), &RGBColor(255, 0, 234).to_rgba())
+ root.draw_pixel((x as i32, y as i32), RGBColor(255, 0, 234).color())
.unwrap();
}
}