mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 04:30:43 +00:00
Offset SummaryChart lines by one pixel (higher) to counter antialiasing
This commit is contained in:
parent
a73a9fc8ee
commit
48e20fc825
@ -18,7 +18,7 @@ SummaryChart::SummaryChart(QString label,GraphType type)
|
|||||||
addGLBuf(quads=new GLShortBuffer(20000,GL_QUADS));
|
addGLBuf(quads=new GLShortBuffer(20000,GL_QUADS));
|
||||||
addGLBuf(lines=new GLShortBuffer(20000,GL_LINES));
|
addGLBuf(lines=new GLShortBuffer(20000,GL_LINES));
|
||||||
quads->forceAntiAlias(true);
|
quads->forceAntiAlias(true);
|
||||||
lines->setSize(2);
|
lines->setSize(2.5);
|
||||||
lines->forceAntiAlias(false);
|
lines->forceAntiAlias(false);
|
||||||
m_empty=true;
|
m_empty=true;
|
||||||
hl_day=-1;
|
hl_day=-1;
|
||||||
@ -463,7 +463,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
|
|||||||
} else if (m_graphtype==GT_LINE) { // if (m_graphtype==GT_BAR
|
} else if (m_graphtype==GT_LINE) { // if (m_graphtype==GT_BAR
|
||||||
col.setAlpha(128);
|
col.setAlpha(128);
|
||||||
short px2=px+barw;
|
short px2=px+barw;
|
||||||
short py2=top+height-1-h;
|
short py2=(top+height-2)-h;
|
||||||
py2+=j;
|
py2+=j;
|
||||||
if (lastdaygood) {
|
if (lastdaygood) {
|
||||||
lines->add(lastX[j],lastY[j],px,py2,m_colors[j]);
|
lines->add(lastX[j],lastY[j],px,py2,m_colors[j]);
|
||||||
|
Loading…
Reference in New Issue
Block a user