mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-06 03:37:29 +08:00
Stubbed out the different draw brushes being set; flattened loops slightly and posted a note
This commit is contained in:
parent
c6d0536268
commit
816910f7be
@ -113,11 +113,22 @@ void Plate2D::repaint(wxPaintEvent& e) {
|
|||||||
|
|
||||||
obj.instance_thumbnails.emplace_back(thumbnail);
|
obj.instance_thumbnails.emplace_back(thumbnail);
|
||||||
|
|
||||||
for (auto& poly : obj.instance_thumbnails) {
|
if (0) { // object is dragged
|
||||||
for (const auto& points : poly.expolygons) {
|
dc->SetBrush(dragged_brush);
|
||||||
auto poly { this->scaled_points_to_pixel(Polygon(points), 1) };
|
} else if (0) {
|
||||||
dc->DrawPolygon(poly.size(), poly.data(), 0, 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user