geometry: rewrite Coordinates trait into a concrete struct, pass coords by reference to shaders, and add a Rectangle type
This commit is contained in:
@ -72,7 +72,7 @@ impl<T: SmartLedsWrite<Color = Rgb<u8>>, S: Surface> Display<S> for SmartLedDisp
|
||||
let mut pixel = Rgb::new(0, 0, 0);
|
||||
for surface in self.surfaces.iter() {
|
||||
surface.with_shader(|shader| {
|
||||
pixel = pixel.saturating_add(shader.draw(virt_coords.clone()));
|
||||
pixel = pixel.saturating_add(shader.draw(&virt_coords));
|
||||
})
|
||||
}
|
||||
self.total_mw += pixel.as_milliwatts();
|
||||
|
Reference in New Issue
Block a user