! Sets whether painting uses antialiasing or not. Use this method instead of using setRenderHint with QPainter::Antialiasing directly, as it allows QCPPainter to regain pixel exactness between antialiased and non-antialiased painting (Since Qt < 5.0 uses slightly different coordinate systems for AA/Non-AA painting). */
| 383 | AA/Non-AA painting). |
| 384 | */ |
| 385 | void QCPPainter::setAntialiasing(bool enabled) |
| 386 | { |
| 387 | setRenderHint(QPainter::Antialiasing, enabled); |
| 388 | if (mIsAntialiasing != enabled) |
| 389 | { |
| 390 | mIsAntialiasing = enabled; |
| 391 | if (!mModes.testFlag(pmVectorized)) // antialiasing half-pixel shift only needed for rasterized outputs |
| 392 | { |
| 393 | if (mIsAntialiasing) |
| 394 | translate(0.5, 0.5); |
| 395 | else |
| 396 | translate(-0.5, -0.5); |
| 397 | } |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | /*! |
| 402 | Sets the mode of the painter. This controls whether the painter shall adjust its |
no outgoing calls
no test coverage detected