kosinix / raster

An image processing library for Rust
https://docs.rs/raster/
MIT License
93 stars 14 forks source link

Image set_pixel make color attribute to a reference #12

Closed teuron closed 7 years ago

teuron commented 7 years ago

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<()>