private void EllipticalArc(double rx, double ry, double xAxisRotation, bool largeArcFlag, bool sweepDirectionFlag, double x, double y) { var startX = _currentX; var startY = _currentY; for (var i = 0; i < _bezierCurveInterpolationSteps; i++) { BezierCurveHelper.PointOnEllipticalArc(startX, startY, rx, ry, xAxisRotation, largeArcFlag, sweepDirectionFlag, x, y, (double)i / _bezierCurveInterpolationSteps, out var nextPointX, out var nextPointY); LineTo(nextPointX, nextPointY); } LineTo(x, y); }
private void QuadraticBezierCurveTo(double x1, double y1, double x, double y) { var startX = _currentX; var startY = _currentY; for (var i = 0; i < _bezierCurveInterpolationSteps; i++) { BezierCurveHelper.PointOnQuadraticBezierCurve(startX, startY, x1, y1, x, y, (double)i / _bezierCurveInterpolationSteps, out var nextPointX, out var nextPointY); LineTo(nextPointX, nextPointY); } LineTo(x, y); _previousCommandControlPointX = x1; _previousCommandControlPointY = y1; }