kosinix/raster

Image set_pixel make color attribute to a reference

Closed this issue · 0 comments

Let the set_pixel method use a reference of a Color instead of consuming it.

If I want to draw a line on a picture, i have to clone the Color for each pixel.

pub fn set_pixel(&mut self, x: i32, y:i32, color: &Color ) -> RasterResult<()>