diff options
author | Norbert Preining <norbert@preining.info> | 2023-07-08 03:01:46 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-07-08 03:01:46 +0000 |
commit | eeed32591ed8e985fd458c43d976027ad679d682 (patch) | |
tree | 1a5db64fc7b9df26f2887acbde587aed73315604 /dviware/dvisvgm/src/PathClipper.cpp | |
parent | 2178d699db60492a15e11c107f17da33543af865 (diff) |
CTAN sync 202307080301
Diffstat (limited to 'dviware/dvisvgm/src/PathClipper.cpp')
-rw-r--r-- | dviware/dvisvgm/src/PathClipper.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dviware/dvisvgm/src/PathClipper.cpp b/dviware/dvisvgm/src/PathClipper.cpp index 50030f9657..14588f8981 100644 --- a/dviware/dvisvgm/src/PathClipper.cpp +++ b/dviware/dvisvgm/src/PathClipper.cpp @@ -58,7 +58,7 @@ class FlattenActions : public CurvedPath::IterationActions { if (p == _currentPoint && !_currentPoly.empty()) return; closepath(); - _currentPoly.emplace_back(IntPoint(to_cInt(p.x()), to_cInt(p.y()), 0)); + _currentPoly.emplace_back(to_cInt(p.x()), to_cInt(p.y()), 0); _currentPoint = _startPoint = p; } @@ -66,10 +66,10 @@ class FlattenActions : public CurvedPath::IterationActions { if (p == _currentPoint && !_currentPoly.empty()) return; if (_currentPoly.empty()) // this shouldn't happen but in case it does... - _currentPoly.emplace_back(IntPoint(0, 0, 0)); // ...add a start point first + _currentPoly.emplace_back(0, 0, 0); // ...add a start point first _numLines--; _currentPoly.back().Z.label2 = _numLines; - _currentPoly.emplace_back(IntPoint(to_cInt(p.x()), to_cInt(p.y()), ZType(_numLines, 0))); + _currentPoly.emplace_back(to_cInt(p.x()), to_cInt(p.y()), ZType(_numLines, 0)); _currentPoint = p; } @@ -100,7 +100,7 @@ class FlattenActions : public CurvedPath::IterationActions { protected: void addCurvePoints (const CubicBezier &bezier) { if (_currentPoly.empty()) // this shouldn't happen but in case it does, ... - _currentPoly.emplace_back(IntPoint(0, 0, 0)); // ...add a start point first + _currentPoly.emplace_back(0, 0, 0); // ...add a start point first vector<DPair> points; // points of flattened curve vector<double> t; // corresponding 'time' parameters bezier.approximate(0.01, points, &t); @@ -113,7 +113,7 @@ class FlattenActions : public CurvedPath::IterationActions { continue; _currentPoly.back().Z.label2 = ZLabel(_curves.size(), t[i-1]); ZLabel label(_curves.size(), t[i]); - _currentPoly.emplace_back(IntPoint(to_cInt(p.x()), to_cInt(p.y()), ZType(label, label))); + _currentPoly.emplace_back(to_cInt(p.x()), to_cInt(p.y()), ZType(label, label)); _currentPoint = p; } } @@ -211,7 +211,7 @@ inline ZLabel division_label (const IntPoint &p1, const IntPoint &p2, const IntP int32_t id = segment_id(p1, p2, t1, t2); if (id > 0) s = t1+(t2-t1)*division_ratio(p1, p2, q); - return ZLabel(id, s); + return {id, s}; } |