[][src]Function raster::editor::fill

pub fn fill(src: &mut Image, color: Color) -> RasterResult<()>

Fill an image with color.

Examples

use raster::Image;
use raster::editor;
use raster::Color;

// Create a 100x100 image
let mut image = Image::blank(100, 100);

// Fill it with red
editor::fill(&mut image, Color::red()).unwrap();

// Save it
raster::save(&image, "tests/out/test_fill.png").unwrap();