mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-21 16:37:48 +00:00
Compare commits
2 Commits
1336ff3a42
...
cfe0a56983
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfe0a56983 | ||
|
|
0c248d027e |
@@ -342,7 +342,7 @@ impl<'f> Display<'f> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (0..width).contains(&x) && (0..height).contains(&y) {
|
if (0..width).contains(&x) && (0..height).contains(&y) {
|
||||||
let color = Color::rgb(color.r(), color.g(), color.b());
|
let color = Color { red: color.r(), green: color.g(), blue: color.b() };
|
||||||
|
|
||||||
set_pixel_in(self.framebuffer, Position { x, y }, color);
|
set_pixel_in(self.framebuffer, Position { x, y }, color);
|
||||||
}
|
}
|
||||||
@@ -360,7 +360,9 @@ impl<'f> DrawTarget for Display<'f> {
|
|||||||
where
|
where
|
||||||
I: IntoIterator<Item = Pixel<Self::Color>>,
|
I: IntoIterator<Item = Pixel<Self::Color>>,
|
||||||
{
|
{
|
||||||
pixels.into_iter().for_each(|p| self.draw_pixel(p));
|
for pixel in pixels.into_iter() {
|
||||||
|
self.draw_pixel(pixel);
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user