| 28 | } |
| 29 | |
| 30 | void ScopePanel::drawPanelContents() { |
| 31 | |
| 32 | if (scopeMode == SCOPE_MODE_Y) { |
| 33 | bgPanel.setFillColor(ThemeMgr::mgr.currentTheme->scopeBackground, ThemeMgr::mgr.currentTheme->scopeBackground * 2.0); |
| 34 | bgPanel.calcTransform(transform); |
| 35 | bgPanel.draw(); |
| 36 | glLineWidth(1.0); |
| 37 | glEnable(GL_LINE_SMOOTH); |
| 38 | glLoadMatrixf(transform.to_ptr()); |
| 39 | glColor3f(ThemeMgr::mgr.currentTheme->scopeLine.r * 0.35, ThemeMgr::mgr.currentTheme->scopeLine.g * 0.35, |
| 40 | ThemeMgr::mgr.currentTheme->scopeLine.b * 0.35); |
| 41 | glBegin (GL_LINES); |
| 42 | glVertex2f(-1.0, 0.0); |
| 43 | glVertex2f(1.0, 0.0); |
| 44 | glEnd(); |
| 45 | } else if (scopeMode == SCOPE_MODE_2Y) { |
| 46 | bgPanelStereo[0].setFillColor(ThemeMgr::mgr.currentTheme->scopeBackground, ThemeMgr::mgr.currentTheme->scopeBackground * 2.0); |
| 47 | bgPanelStereo[1].setFillColor(ThemeMgr::mgr.currentTheme->scopeBackground, ThemeMgr::mgr.currentTheme->scopeBackground * 2.0); |
| 48 | |
| 49 | bgPanelStereo[0].calcTransform(transform); |
| 50 | bgPanelStereo[0].draw(); |
| 51 | bgPanelStereo[1].calcTransform(transform); |
| 52 | bgPanelStereo[1].draw(); |
| 53 | |
| 54 | glLineWidth(1.0); |
| 55 | glLoadMatrixf(transform.to_ptr()); |
| 56 | glColor3f(ThemeMgr::mgr.currentTheme->scopeLine.r, ThemeMgr::mgr.currentTheme->scopeLine.g, ThemeMgr::mgr.currentTheme->scopeLine.b); |
| 57 | glEnable(GL_LINE_SMOOTH); |
| 58 | glBegin (GL_LINES); |
| 59 | glVertex2f(-1.0, 0.0); |
| 60 | glVertex2f(1.0, 0.0); |
| 61 | glColor3f(ThemeMgr::mgr.currentTheme->scopeLine.r * 0.35, ThemeMgr::mgr.currentTheme->scopeLine.g * 0.35, |
| 62 | ThemeMgr::mgr.currentTheme->scopeLine.b * 0.35); |
| 63 | glVertex2f(-1.0, 0.5); |
| 64 | glVertex2f(1.0, 0.5); |
| 65 | glVertex2f(-1.0, -0.5); |
| 66 | glVertex2f(1.0, -0.5); |
| 67 | glEnd(); |
| 68 | |
| 69 | } else if (scopeMode == SCOPE_MODE_XY) { |
| 70 | RGBA4f bg1(ThemeMgr::mgr.currentTheme->scopeBackground), bg2(ThemeMgr::mgr.currentTheme->scopeBackground * 2.0); |
| 71 | bg1.a = 0.05f; |
| 72 | bg2.a = 0.05f; |
| 73 | bgPanel.setFillColor(bg1, bg2); |
| 74 | bgPanel.calcTransform(transform); |
| 75 | bgPanel.draw(); |
| 76 | glLineWidth(1.0); |
| 77 | glEnable(GL_POINT_SMOOTH); |
| 78 | glPointSize(1.0); |
| 79 | glLoadMatrixf(transform.to_ptr()); |
| 80 | glColor3f(ThemeMgr::mgr.currentTheme->scopeLine.r * 0.15, ThemeMgr::mgr.currentTheme->scopeLine.g * 0.15, |
| 81 | ThemeMgr::mgr.currentTheme->scopeLine.b * 0.15); |
| 82 | } |
| 83 | |
| 84 | if (!points.empty()) { |
| 85 | glEnable (GL_BLEND); |
| 86 | glEnable (GL_LINE_SMOOTH); |
| 87 | glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); |
nothing calls this directly
no test coverage detected