projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
652010e
)
Clip signal painting with glScissor
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 7 Jul 2012 07:16:38 +0000
(08:16 +0100)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Mon, 3 Sep 2012 12:59:06 +0000
(13:59 +0100)
sigview.cpp
patch
|
blob
|
history
diff --git
a/sigview.cpp
b/sigview.cpp
index 8461af6e455f37b1182ef9b9bc1a8197ada54d09..dea3cbc1255bc646307cbd39448be239c0982fae 100644
(file)
--- a/
sigview.cpp
+++ b/
sigview.cpp
@@
-86,6
+86,8
@@
void SigView::paintEvent(QPaintEvent *event)
glClear(GL_COLOR_BUFFER_BIT);
// Plot the signal
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(LabelMarginWidth, 0, width(), height());
offset = RulerHeight;
BOOST_FOREACH(const shared_ptr<Signal> s, sigs)
{
@@
-99,6
+101,8
@@
void SigView::paintEvent(QPaintEvent *event)
offset += SignalHeight;
}
+ glDisable(GL_SCISSOR_TEST);
+
// Prepare for QPainter rendering
glMatrixMode(GL_MODELVIEW);
glPopMatrix();