| 150 | static constexpr float K_PI = 3.141592f; |
| 151 | |
| 152 | void VPath::VPathData::arcTo(const VRectF &rect, float startAngle, |
| 153 | float sweepLength, bool forceMoveTo) |
| 154 | { |
| 155 | size_t point_count = 0; |
| 156 | VPointF pts[15]; |
| 157 | VPointF curve_start = |
| 158 | curvesForArc(rect, startAngle, sweepLength, pts, &point_count); |
| 159 | |
| 160 | reserve(point_count + 1, point_count / 3 + 1); |
| 161 | if (empty() || forceMoveTo) { |
| 162 | moveTo(curve_start.x(), curve_start.y()); |
| 163 | } else { |
| 164 | lineTo(curve_start.x(), curve_start.y()); |
| 165 | } |
| 166 | for (size_t i = 0; i < point_count; i += 3) { |
| 167 | cubicTo(pts[i].x(), pts[i].y(), pts[i + 1].x(), pts[i + 1].y(), |
| 168 | pts[i + 2].x(), pts[i + 2].y()); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | void VPath::VPathData::addCircle(float cx, float cy, float radius, |
| 173 | VPath::Direction dir) |
nothing calls this directly
no test coverage detected