Added color -1 to mean resetting all color.

This commit is contained in:
Markus Lampert
2020-09-08 23:24:46 -07:00
committed by sliptonic
parent d68b5064cf
commit 1109691393

View File

@@ -293,7 +293,7 @@ void Voronoi::colorColinear(Voronoi::color_type color, double degree) {
void Voronoi::resetColor(Voronoi::color_type color) {
for (auto it = vd->cells().begin(); it != vd->cells().end(); ++it) {
if (it->color() == color) {
if (color == -1 || it->color() == color) {
it->color(0);
}
}