summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/EllipticalArc.cpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-12 03:01:29 +0000
committerNorbert Preining <norbert@preining.info>2023-01-12 03:01:29 +0000
commit6a7900c93acc16d1bbd2f1e26286c7dd7387e6c0 (patch)
tree76196287351cba68a51934c49468bf1a7846aa76 /dviware/dvisvgm/src/EllipticalArc.cpp
parentc1c19023b4b1d43cb874f84df5102b485853e672 (diff)
CTAN sync 202301120301
Diffstat (limited to 'dviware/dvisvgm/src/EllipticalArc.cpp')
-rw-r--r--dviware/dvisvgm/src/EllipticalArc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/dviware/dvisvgm/src/EllipticalArc.cpp b/dviware/dvisvgm/src/EllipticalArc.cpp
index 6de120b0e6..13b6b2d596 100644
--- a/dviware/dvisvgm/src/EllipticalArc.cpp
+++ b/dviware/dvisvgm/src/EllipticalArc.cpp
@@ -2,7 +2,7 @@
** EllipticalArc.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2022 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -156,7 +156,7 @@ void EllipticalArc::transform (const Matrix &matrix) {
/** Approximates an arc of the unit circle by a single cubic Bézier curve.
* @param[in] phi start angle of the arc in radians
* @param[in] delta length of the arc */
-static Bezier approx_unit_arc (double phi, double delta) {
+static CubicBezier approx_unit_arc (double phi, double delta) {
double c = 0.551915024494; // see http://spencermortensen.com/articles/bezier-circle
if (abs(delta + math::HALF_PI) < 1e-7)
c = -c;
@@ -166,13 +166,13 @@ static Bezier approx_unit_arc (double phi, double delta) {
DPair p4(cos(phi+delta), sin(phi+delta));
DPair p2(p1.x()-c*p1.y(), p1.y()+c*p1.x());
DPair p3(p4.x()+c*p4.y(), p4.y()-c*p4.x());
- return Bezier(p1, p2, p3, p4);
+ return CubicBezier(p1, p2, p3, p4);
}
/** Approximates the arc by a sequence of cubic Bézier curves. */
-vector<Bezier> EllipticalArc::approximate () const {
- vector<Bezier> beziers;
+vector<CubicBezier> EllipticalArc::approximate () const {
+ vector<CubicBezier> beziers;
if (_startPoint != _endPoint) {
if (isStraightLine()) {
DPair dir = (_endPoint - _startPoint);