Stubbed out the different draw brushes being set; flattened loops slightly and posted a note

This commit is contained in:
Joseph Lenox 2018-05-06 21:39:31 -05:00
parent 6ad3383584
commit 7c96e56e07

View File

@ -113,11 +113,22 @@ void Plate2D::repaint(wxPaintEvent& e) {
obj.instance_thumbnails.emplace_back(thumbnail);
for (auto& poly : obj.instance_thumbnails) {
for (const auto& points : poly.expolygons) {
auto poly { this->scaled_points_to_pixel(Polygon(points), 1) };
dc->DrawPolygon(poly.size(), poly.data(), 0, 0);
}
if (0) { // object is dragged
dc->SetBrush(dragged_brush);
} else if (0) {
dc->SetBrush(instance_brush);
} else if (0) {
dc->SetBrush(selected_brush);
} else {
dc->SetBrush(objects_brush);
}
// porting notes: perl here seems to be making a single-item array of the
// thumbnail set.
// no idea why. It doesn't look necessary, so skip the outer layer
// and draw the contained expolygons
for (const auto& points : obj.instance_thumbnails.back().expolygons) {
auto poly { this->scaled_points_to_pixel(Polygon(points), 1) };
dc->DrawPolygon(poly.size(), poly.data(), 0, 0);
}
}
}