Enable anti-aliasing for just the stippled line components

This commit is contained in:
Mark Watkins 2011-12-20 12:43:47 +10:00
parent 5e089deefe
commit ee602a64d2
2 changed files with 6 additions and 4 deletions

View File

@ -297,7 +297,8 @@ void GLShortBuffer::draw()
}
if (m_type==GL_LINES || m_type==GL_LINE_LOOP) {
if (m_stippled) {
glLineStipple(1, 0xAAAA);
glLineStipple(1, 0xcccc);
glEnable(GL_BLEND);
glEnable(GL_LINE_STIPPLE);
} else {
glLineStipple(1, 0xFFFF);
@ -341,6 +342,7 @@ void GLShortBuffer::draw()
glPolygonMode(GL_BACK,GL_FILL);
}
if (m_stippled) {
glDisable(GL_BLEND);
glDisable(GL_LINE_STIPPLE);
glLineStipple(1, 0xFFFF);
}
@ -2333,8 +2335,8 @@ void gGraphView::paintGL()
//if (print_scaleY>1) {
// lines->setSize(3);
// }
backlines->draw();
stippled->draw();
backlines->draw();
for (int i=0;i<m_graphs.size();i++) {
m_graphs[i]->drawGLBuf();
}

View File

@ -20,9 +20,9 @@ gXGrid::gXGrid(QColor col)
{
Q_UNUSED(col)
m_major_color=QColor(100,100,100,64);
m_major_color=QColor(130,130,130,64);
//m_major_color=QColor(180,180,180,92);
m_minor_color=QColor(220,220,220,128);
m_minor_color=QColor(200,200,200,64);
m_show_major_lines=true;
m_show_minor_lines=true;
}