Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (21 sloc) 680 Bytes
extern crate gif;
extern crate image;
extern crate pathfinder;
extern crate rand;
use image::Rgba;
use pathfinder::{map::gif::*, *};
fn main() -> std::io::Result<()> {
let mut gif = Gif::new("out.gif", 200, 100);
let radius = [30, 20, 40];
let color = [[250, 20, 20, 255], [20, 20, 250, 255], [20, 250, 20, 255]];
for _ in 0..10 {
let mut groups = Group::from_list(&[(0, 0), (45, 40), (110, 20)]);
for (j, ref mut group) in groups.iter_mut().enumerate() {
group.radius(radius[j]);
group.color(Rgba { data: color[j] });
group.add(100);
}
gif.push(Map::new().map(&groups))?
}
Ok(())
}
You can’t perform that action at this time.