Draw the filled contours last, so that transparency (for the

default fill color for closed non-self-intersecting contours) works
correctly.

[git-p4: depot-paths = "//depot/solvespace/": change = 2081]
This commit is contained in:
Jonathan Westhues 2009-11-29 03:20:45 -08:00
parent 7a66e00865
commit 48b79b912c

View File

@ -648,14 +648,6 @@ void GraphicsWindow::Paint(int w, int h) {
nogrid:;
}
// Draw filled paths in all groups, when those filled paths were requested
// specially by assigning a style with a fill color.
Group *g;
for(g = SK.group.First(); g; g = SK.group.NextAfter(g)) {
if(!(g->IsVisible())) continue;
g->DrawFilledPaths();
}
// Draw the active group; this does stuff like the mesh and edges.
(SK.GetGroup(activeGroup))->Draw();
@ -663,6 +655,17 @@ nogrid:;
if(showHdnLines) glDisable(GL_DEPTH_TEST);
Entity::DrawAll();
// Draw filled paths in all groups, when those filled paths were requested
// specially by assigning a style with a fill color, or when the filled
// paths are just being filled by default. This should go last, to make
// the transparency work.
Group *g;
for(g = SK.group.First(); g; g = SK.group.NextAfter(g)) {
if(!(g->IsVisible())) continue;
g->DrawFilledPaths();
}
glDisable(GL_DEPTH_TEST);
// Draw the constraints
for(i = 0; i < SK.constraint.n; i++) {