Skip to content

Commit

Permalink
updated drawing steps. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent e4597c7 commit b1ab211
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions src/netedit/elements/network/GNEEdge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,17 +564,10 @@ GNEEdge::drawGL(const GUIVisualizationSettings& s) const {
GLHelper::drawBoundary(s, getCenteringBoundary());
// get detail level from the first lane
const auto d = myLanes.front()->getDrawingConstants()->getDetail();
// draw draw lanes
for (const auto& lane : myLanes) {
lane->drawGL(s);
}
// draw junctions
getFromJunction()->drawGL(s);
getToJunction()->drawGL(s);
// draw geometry points
drawEdgeGeometryPoints(s, d);
// check if draw details
if (!s.drawForObjectUnderCursor) {
// draw geometry points
drawEdgeGeometryPoints(s, d);
// draw edge shape (a red line only visible if lane shape is strange)
drawEdgeShape(s, d);
// draw edge stopOffset
Expand All @@ -586,10 +579,17 @@ GNEEdge::drawGL(const GUIVisualizationSettings& s) const {
// draw dotted contour
myContour.drawDottedContours(s, d, s.dottedContourSettings.segmentWidth, true);
}
// calculate edge contour (always before children)
calculateEdgeContour(s, d);
// draw lanes
for (const auto& lane : myLanes) {
lane->drawGL(s);
}
// draw junctions
getFromJunction()->drawGL(s);
getToJunction()->drawGL(s);
// draw childrens
drawChildrens(s, d);
// calculate contours
calculateContours(s, d);
}
}

Expand Down Expand Up @@ -2733,7 +2733,7 @@ GNEEdge::drawChildrens(const GUIVisualizationSettings& s, const GUIVisualization


void
GNEEdge::calculateContours(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const {
GNEEdge::calculateEdgeContour(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const {
// calculate contour and draw dotted geometry
myContour.calculateContourEdge(s, d, this, true, true);
// get snap radius
Expand Down
2 changes: 1 addition & 1 deletion src/netedit/elements/network/GNEEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ class GNEEdge : public GNENetworkElement, public GNECandidateElement {
void drawChildrens(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const;

/// @brief calculate contours
void calculateContours(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const;
void calculateEdgeContour(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d) const;

/// @brief draw TAZElements
void drawTAZElements(const GUIVisualizationSettings& s) const;
Expand Down
6 changes: 3 additions & 3 deletions src/netedit/elements/network/GNEJunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,13 +644,13 @@ GNEJunction::drawGL(const GUIVisualizationSettings& s) const {
myContour.drawDottedContours(s, d, s.dottedContourSettings.segmentWidth, true);
// draw dotted contour for bubble
if (drawBubble) {
myContour.drawDottedContours(s, d, s.dottedContourSettings.segmentWidth, true);
myCircleContour.drawDottedContours(s, d, s.dottedContourSettings.segmentWidth, true);
}
}
// calculate junction contour (always before children)
calculateJunctioncontour(s, d, junctionExaggeration, drawBubble);
// draw Junction childs
drawJunctionChildren(s, d);
// calculate junction contour
calculateJunctioncontour(s, d, junctionExaggeration, drawBubble);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/netedit/elements/network/GNELane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ GNELane::drawGL(const GUIVisualizationSettings& s) const {
// draw dotted contour
myContour.drawDottedContours(s, myDrawingConstants->getDetail(), s.dottedContourSettings.segmentWidth, true);
}
// calculate contour (always before children)
calculateLaneContour(s);
// draw children
drawChildren(s);
// calculate contour
calculateLaneContour(s);
}


Expand Down

0 comments on commit b1ab211

Please sign in to comment.