diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-06-07 01:19:18 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-06-07 01:19:18 +0000 |
| commit | 48ddc5ea8c9ee44c7ae388d43f9be9552acf64ae (patch) | |
| tree | 9e66e429e2025fb99b28511231f87c533c15e865 /src/livarot | |
| parent | Clean up some unnecessary pointer usage in livarot (diff) | |
| download | inkscape-48ddc5ea8c9ee44c7ae388d43f9be9552acf64ae.tar.gz inkscape-48ddc5ea8c9ee44c7ae388d43f9be9552acf64ae.zip | |
Undo changes in r13391
(bzr r13341.1.51)
Diffstat (limited to 'src/livarot')
| -rw-r--r-- | src/livarot/Path.h | 12 | ||||
| -rw-r--r-- | src/livarot/PathConversion.cpp | 3 | ||||
| -rw-r--r-- | src/livarot/PathCutting.cpp | 7 | ||||
| -rw-r--r-- | src/livarot/PathOutline.cpp | 9 | ||||
| -rw-r--r-- | src/livarot/PathStroke.cpp | 3 |
5 files changed, 14 insertions, 20 deletions
diff --git a/src/livarot/Path.h b/src/livarot/Path.h index 5d5a24e5a..32ee71ffc 100644 --- a/src/livarot/Path.h +++ b/src/livarot/Path.h @@ -135,26 +135,26 @@ public: // closeIfNeeded=false prevent the function from closing the path (resulting in a non-eulerian graph // pathID is a identification number for the path, and is used for recomposing curves from polylines // give each different Path a different ID, and feed the appropriate orig[] to the ConvertToForme() function - void Fill(Shape &dest, int pathID = -1, bool justAdd = false, + void Fill(Shape *dest, int pathID = -1, bool justAdd = false, bool closeIfNeeded = true, bool invert = false); // - stroke the path; usual parameters: type of cap=butt, type of join=join and miter (see LivarotDefs.h) // doClose treat the path as closed (ie a loop) - void Stroke(Shape &dest, bool doClose, double width, JoinType join, + void Stroke(Shape *dest, bool doClose, double width, JoinType join, ButtType butt, double miter, bool justAdd = false); // build a Path that is the outline of the Path instance's description (the result is stored in dest) // it doesn't compute the exact offset (it's way too complicated, but an approximation made of cubic bezier patches // and segments. the algorithm was found in a plugin for Impress (by Chris Cox), but i can't find it back... - void Outline(Path &dest, double width, JoinType join, ButtType butt, + void Outline(Path *dest, double width, JoinType join, ButtType butt, double miter); // half outline with edges having the same direction as the original - void OutsideOutline(Path &dest, double width, JoinType join, ButtType butt, + void OutsideOutline(Path *dest, double width, JoinType join, ButtType butt, double miter); // half outline with edges having the opposite direction as the original - void InsideOutline (Path & dest, double width, JoinType join, ButtType butt, + void InsideOutline (Path * dest, double width, JoinType join, ButtType butt, double miter); // polyline to cubic bezier patches @@ -184,7 +184,7 @@ public: void LoadPath(Geom::Path const &path, Geom::Affine const &tr, bool doTransformation, bool append = false); void LoadPathVector(Geom::PathVector const &pv, Geom::Affine const &tr, bool doTransformation); void LoadPathVector(Geom::PathVector const &pv); - Geom::PathVector MakePathVector(); + Geom::PathVector* MakePathVector(); void Transform(const Geom::Affine &trans); diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp index 0ef88841a..42df898e6 100644 --- a/src/livarot/PathConversion.cpp +++ b/src/livarot/PathConversion.cpp @@ -1269,9 +1269,8 @@ void Path::RecBezierTo(Geom::Point const &iP, Geom::Point const &iS,Geom::Point * in a path description ( you need to have prepared the back data for that, of course) */ -void Path::Fill(Shape& destr, int pathID, bool justAdd, bool closeIfNeeded, bool invert) +void Path::Fill(Shape* dest, int pathID, bool justAdd, bool closeIfNeeded, bool invert) { - Shape* dest = &destr; if ( dest == NULL ) { return; } diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp index 74653ca06..49b2c5a78 100644 --- a/src/livarot/PathCutting.cpp +++ b/src/livarot/PathCutting.cpp @@ -269,11 +269,10 @@ void Path::DashSubPath(int spL, int spP, std::vector<path_lineto> const &orig_pt } } -Geom::PathVector +Geom::PathVector * Path::MakePathVector() { - Geom::PathVector retPv; - Geom::PathVector *pv = &retPv; + Geom::PathVector *pv = new Geom::PathVector(); Geom::Path * currentpath = NULL; Geom::Point lastP,bezSt,bezEn; @@ -381,7 +380,7 @@ Path::MakePathVector() } } - return *pv; + return pv; } void Path::AddCurve(Geom::Curve const &c) diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp index f1978931a..211ee31e2 100644 --- a/src/livarot/PathOutline.cpp +++ b/src/livarot/PathOutline.cpp @@ -21,9 +21,8 @@ // outline of a path. // computed by making 2 offsets, one of the "left" side of the path, one of the right side, and then glueing the two // the left side has to be reversed to make a contour -void Path::Outline(Path &destr, double width, JoinType join, ButtType butt, double miter) +void Path::Outline(Path *dest, double width, JoinType join, ButtType butt, double miter) { - ::Path * dest = &destr; if ( descr_flags & descr_adding_bezier ) { CancelBezier(); } @@ -199,10 +198,9 @@ void Path::Outline(Path &destr, double width, JoinType join, ButtType butt, doub // versions for outlining closed path: they only make one side of the offset contour void -Path::OutsideOutline (Path & destr, double width, JoinType join, ButtType butt, +Path::OutsideOutline (Path * dest, double width, JoinType join, ButtType butt, double miter) { - ::Path * dest = &destr; if (descr_flags & descr_adding_bezier) { CancelBezier(); } @@ -225,10 +223,9 @@ Path::OutsideOutline (Path & destr, double width, JoinType join, ButtType butt, } void -Path::InsideOutline (Path & destr, double width, JoinType join, ButtType butt, +Path::InsideOutline (Path * dest, double width, JoinType join, ButtType butt, double miter) { - ::Path * dest = &destr; if ( descr_flags & descr_adding_bezier ) { CancelBezier(); } diff --git a/src/livarot/PathStroke.cpp b/src/livarot/PathStroke.cpp index 07ecc8114..50c335176 100644 --- a/src/livarot/PathStroke.cpp +++ b/src/livarot/PathStroke.cpp @@ -38,10 +38,9 @@ static Geom::Point StrokeNormalize(const Geom::Point value, double length) { } } -void Path::Stroke(Shape &destr, bool doClose, double width, JoinType join, +void Path::Stroke(Shape *dest, bool doClose, double width, JoinType join, ButtType butt, double miter, bool justAdd) { - ::Shape* dest = &destr; if (dest == NULL) { return; } |
