| 5571 | } |
| 5572 | |
| 5573 | void QCPLabelPainterPrivate::drawTickLabel(QCPPainter *painter, const QPointF &tickPos, const QString &text) |
| 5574 | { |
| 5575 | double realRotation = mRotation; |
| 5576 | |
| 5577 | AnchorSide realSide = mAnchorSide; |
| 5578 | // for circular axes, the anchor side is determined depending on the quadrant of tickPos with respect to mCircularReference |
| 5579 | if (mAnchorMode == amSkewedUpright) |
| 5580 | { |
| 5581 | realSide = skewedAnchorSide(tickPos, 0.2, 0.3); |
| 5582 | } else if (mAnchorMode == amSkewedRotated) // in this mode every label is individually rotated to match circle tangent |
| 5583 | { |
| 5584 | realSide = skewedAnchorSide(tickPos, 0, 0); |
| 5585 | realRotation += QCPVector2D(tickPos-mAnchorReference).angle()/M_PI*180.0; |
| 5586 | if (realRotation > 90) realRotation -= 180; |
| 5587 | else if (realRotation < -90) realRotation += 180; |
| 5588 | } |
| 5589 | |
| 5590 | realSide = rotationCorrectedSide(realSide, realRotation); // rotation angles may change the true anchor side of the label |
| 5591 | drawLabelMaybeCached(painter, mFont, mColor, getAnchorPos(tickPos), realSide, realRotation, text); |
| 5592 | } |
| 5593 | |
| 5594 | /*! \internal |
| 5595 | |