41 const int pointsCount = points.size();
51 for (
int i = 1; i < pointsCount; i++) {
57 Q_FOREACH (
const QPointF &point, points) {
63 for (
int i = 0; i < pointsCount; i += 3) {
89 for (
int i = 0; i < pointsCount; i += 3) {
90 const QPointF &radii = points[i + 1];
91 const QPointF &angles = points[i + 2] /
rad2deg;
93 QPointF start(radii.x() * cos(angles.x()), -1 * radii.y() * sin(angles.x()));
94 qreal sweepAngle =
degSweepAngle(points[i + 2].x(), points[i + 2].y(),
false);
102 m_parent->
arcTo(radii.x(), radii.y(), points[i + 2].x(), sweepAngle);
116 for (
int i = 0; i < pointsCount; i += 4) {
118 QPointF center = bbox.center();
119 qreal rx = 0.5 * bbox.width();
120 qreal ry = 0.5 * bbox.height();
130 QPointF startRadialVector = points[i + 2] - center;
131 QPointF endRadialVector = points[i + 3] - center;
134 qreal x0 = startRadialVector.x() / rx;
135 qreal y0 = startRadialVector.y() / ry;
137 qreal x1 = endRadialVector.x() / rx;
138 qreal y1 = endRadialVector.y() / ry;
144 qreal sweepAngle =
radSweepAngle(startAngle, stopAngle, clockwise);
147 QPointF startPoint(rx * cos(startAngle), ry * sin(2 *
M_PI - startAngle));
154 if (lineTo && !isFirstCommandInPath && !isFirstCommandInSubpath) {
168 foreach (
const QPointF &point, points) {
169 qreal rx = point.x() - lastPoint->
point().x();
170 qreal ry = point.y() - lastPoint->
point().y();
171 qreal startAngle = xDir ? (ry > 0.0 ? 90.0 : 270.0) : (rx < 0.0 ? 0.0 : 180.0);
172 qreal sweepAngle = xDir ? (rx * ry < 0.0 ? 90.0 : -90.0) : (rx * ry > 0.0 ? 90.0 : -90.0);
173 lastPoint =
m_parent->
arcTo(fabs(rx), fabs(ry), startAngle, sweepAngle);
182 foreach (
const QPointF &point, points) {
183 qreal rx = point.x() - lastPoint->
point().x();
184 qreal ry = point.y() - lastPoint->
point().y();
185 qreal startAngle = xDir ? (ry > 0.0 ? 90.0 : 270.0) : (rx < 0.0 ? 0.0 : 180.0);
186 qreal sweepAngle = xDir ? (rx * ry < 0.0 ? 90.0 : -90.0) : (rx * ry > 0.0 ? 90.0 : -90.0);
187 lastPoint =
m_parent->
arcTo(fabs(rx), fabs(ry), startAngle, sweepAngle);
194 for (
int i = 0; i < pointsCount; i += 2) {