| 34310 | } |
| 34311 | |
| 34312 | void QCPPolarGrid::drawRadialGrid(QCPPainter *painter, const QPointF ¢er, const QVector<double> &coords, const QPen &pen, const QPen &zeroPen) |
| 34313 | { |
| 34314 | if (!mRadialAxis) return; |
| 34315 | if (coords.isEmpty()) return; |
| 34316 | const bool drawZeroLine = zeroPen != Qt::NoPen; |
| 34317 | const double zeroLineEpsilon = qAbs(coords.last()-coords.first())*1e-6; |
| 34318 | |
| 34319 | painter->setPen(pen); |
| 34320 | for (int i=0; i<coords.size(); ++i) |
| 34321 | { |
| 34322 | const double r = mRadialAxis->coordToRadius(coords.at(i)); |
| 34323 | if (drawZeroLine && qAbs(coords.at(i)) < zeroLineEpsilon) |
| 34324 | { |
| 34325 | applyAntialiasingHint(painter, mAntialiasedZeroLine, QCP::aeZeroLine); |
| 34326 | painter->setPen(zeroPen); |
| 34327 | painter->drawEllipse(center, r, r); |
| 34328 | painter->setPen(pen); |
| 34329 | applyDefaultAntialiasingHint(painter); |
| 34330 | } else |
| 34331 | { |
| 34332 | painter->drawEllipse(center, r, r); |
| 34333 | } |
| 34334 | } |
| 34335 | } |
| 34336 | |
| 34337 | void QCPPolarGrid::drawAngularGrid(QCPPainter *painter, const QPointF ¢er, double radius, const QVector<QPointF> &ticksCosSin, const QPen &pen) |
| 34338 | { |
nothing calls this directly
no test coverage detected