From 7c8eb35afd097904a2ae292b2e0aa8f4a851f2bb Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 5 Apr 2014 12:30:08 +1000 Subject: [PATCH] Stop showing pinned graph background when printing --- sleepyhead/Graphs/gGraphView.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sleepyhead/Graphs/gGraphView.cpp b/sleepyhead/Graphs/gGraphView.cpp index 18838c2f..a3db92b8 100644 --- a/sleepyhead/Graphs/gGraphView.cpp +++ b/sleepyhead/Graphs/gGraphView.cpp @@ -3179,24 +3179,25 @@ bool gGraphView::renderGraphs() // can't draw snapshot text using this DrawTextQue function // TODO: Find a better solution for detecting when in snapshot mode - if (m_graphs.size()>1) + if (m_graphs.size()>1) { DrawTextQue(); + // Draw a gradient behind pinned graphs + // glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBegin(GL_QUADS); + glColor4f(1.0,1.0,1.0,1.0); // Gradient start + glVertex2f(0, pinned_height); + glVertex2f(0, 0); + glColor4f(0.7,0.7,1.0,1.0); // Gradient End + glVertex2f(width(), 0); + glVertex2f(width(), pinned_height); + glEnd(); + // glDisable(GL_BLEND); + } + py=0; // start drawing at top... - // glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glBegin(GL_QUADS); - glColor4f(1.0,1.0,1.0,1.0); // Gradient start - glVertex2f(0, pinned_height); - glVertex2f(0, 0); - glColor4f(0.7,0.7,1.0,1.0); // Gradient End - glVertex2f(width(), 0); - glVertex2f(width(), pinned_height); - glEnd(); - // glDisable(GL_BLEND); - - // Draw Pinned graphs for (int i=0;iisEmpty()) continue;