|
|
@ -12,15 +12,13 @@ pub struct Points<'a> {
|
|
|
|
|
|
|
|
|
|
|
|
impl<'a> Shape for Points<'a> {
|
|
|
|
impl<'a> Shape for Points<'a> {
|
|
|
|
fn draw(&self, painter: &mut Painter) {
|
|
|
|
fn draw(&self, painter: &mut Painter) {
|
|
|
|
|
|
|
|
println!("{:?}", self.coords);
|
|
|
|
for (x, y, drawed) in self.coords {
|
|
|
|
for (x, y, drawed) in self.coords {
|
|
|
|
if *drawed {
|
|
|
|
if *drawed {
|
|
|
|
if let Some((x, y)) = painter.get_point(*x, *y) {
|
|
|
|
if let Some((x, y)) = painter.get_point(*x, *y) {
|
|
|
|
painter.paint(x, y, self.color);
|
|
|
|
painter.paint(x, y, self.color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if let Some((x, y)) = painter.get_point(*x, *y) {
|
|
|
|
|
|
|
|
//painter.paint(x, y, Color::Reset);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|