|
|
@ -225,21 +225,12 @@ QPolygonF UBGeometryUtils::arcToPolygon(const QLineF& startRadius, qreal spanAng |
|
|
|
endAngleInDegrees = - endAngleInDegrees; |
|
|
|
endAngleInDegrees = - endAngleInDegrees; |
|
|
|
spanAngleInDegrees = - spanAngleInDegrees; |
|
|
|
spanAngleInDegrees = - spanAngleInDegrees; |
|
|
|
|
|
|
|
|
|
|
|
if (overlap) |
|
|
|
painterPath.setFillRule(Qt::WindingFill); |
|
|
|
{ |
|
|
|
painterPath.arcTo(innerSquare, startAngleInDegrees, spanAngleInDegrees); |
|
|
|
painterPath.addEllipse(outerSquare); |
|
|
|
painterPath.arcTo(endSquare, 180.0 + endAngleInDegrees, spanAngleInDegrees > 0 ? -180.0 : 180.0); |
|
|
|
QPainterPath innerPainterPath; |
|
|
|
painterPath.arcTo(outerSquare, endAngleInDegrees, - spanAngleInDegrees); |
|
|
|
innerPainterPath.addEllipse(innerSquare); |
|
|
|
painterPath.arcTo(startSquare, startAngleInDegrees, spanAngleInDegrees > 0 ? -180.0 : 180.0); |
|
|
|
painterPath = painterPath.subtracted(innerPainterPath); |
|
|
|
painterPath.closeSubpath(); |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
painterPath.arcTo(innerSquare, startAngleInDegrees, spanAngleInDegrees); |
|
|
|
|
|
|
|
painterPath.arcTo(endSquare, 180.0 + endAngleInDegrees, spanAngleInDegrees > 0 ? -180.0 : 180.0); |
|
|
|
|
|
|
|
painterPath.arcTo(outerSquare, endAngleInDegrees, - spanAngleInDegrees); |
|
|
|
|
|
|
|
painterPath.arcTo(startSquare, startAngleInDegrees, spanAngleInDegrees > 0 ? -180.0 : 180.0); |
|
|
|
|
|
|
|
painterPath.closeSubpath(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return painterPath.toFillPolygon(); |
|
|
|
return painterPath.toFillPolygon(); |
|
|
|
} |
|
|
|
} |
|
|
|