Mercurial > hg > easaier-soundaccess
comparison widgets/Plotter.cpp @ 220:7b2a7880a501
antialiasing
author | benoitrigolleau |
---|---|
date | Thu, 07 Feb 2008 15:53:32 +0000 |
parents | fbd4905ada5e |
children | a89ab7dfbf4c |
comparison
equal
deleted
inserted
replaced
219:e8175839a5ac | 220:7b2a7880a501 |
---|---|
141 QPixmap pm(":icons/grid.png"); | 141 QPixmap pm(":icons/grid.png"); |
142 painter->drawPixmap(0,0,pm); | 142 painter->drawPixmap(0,0,pm); |
143 } | 143 } |
144 | 144 |
145 void Plotter::drawCurve(QPainter *painter){ | 145 void Plotter::drawCurve(QPainter *painter){ |
146 painter->setRenderHint (QPainter::Antialiasing, true ); | |
146 QPolygonF polyline(m_signalWidth); | 147 QPolygonF polyline(m_signalWidth); |
147 for(int i = 0 ; i < m_curve.count() ; i++){ | 148 for(int i = 0 ; i < m_curve.count() ; i++){ |
148 polyline[i] = QPoint(m_curve.at(i).x()+m_margin, m_curve.at(i).y()+m_margin); | 149 polyline[i] = QPoint(m_curve.at(i).x()+m_margin, m_curve.at(i).y()+m_margin); |
149 } | 150 } |
150 painter->setPen(Qt::green); | 151 painter->setPen(Qt::green); |
151 painter->drawPolyline(polyline); | 152 painter->drawPolyline(polyline); |
152 } | 153 } |
153 | 154 |
154 void Plotter::drawMaskCurve(QPainter *painter){ | 155 void Plotter::drawMaskCurve(QPainter *painter){ |
155 | 156 |
157 painter->setRenderHint (QPainter::Antialiasing, true ); | |
158 | |
156 QPolygonF polyline(m_signalWidth); | 159 QPolygonF polyline(m_signalWidth); |
157 | 160 |
158 for(int i = 0 ; i < m_signalWidth ; i++){ | 161 for(int i = 0 ; i < m_signalWidth ; i++){ |
159 polyline[i] = QPoint(i+m_margin, m_curveMask[i]+m_margin); | 162 polyline[i] = QPoint(i+m_margin, m_curveMask[i]+m_margin); |
160 } | 163 } |