summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-26 04:34:25 +0000
committerTed Gould <ted@gould.cx>2010-03-26 04:34:25 +0000
commit9e023a3aa964a0d3fa1e31e46d33657367ba68aa (patch)
tree33f1392a340737e4eeefca6fd031f96c29befd2b /src/2geom
parentInstalling the pkgconfig file (diff)
parentAdding in shape-record.h (diff)
downloadinkscape-9e023a3aa964a0d3fa1e31e46d33657367ba68aa.tar.gz
inkscape-9e023a3aa964a0d3fa1e31e46d33657367ba68aa.zip
Merge from trunk
(bzr r8254.1.53)
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/chebyshev.cpp2
-rw-r--r--src/2geom/hvlinesegment.h4
-rw-r--r--src/2geom/path.cpp5
-rw-r--r--src/2geom/svg-path-parser.cpp1
4 files changed, 5 insertions, 7 deletions
diff --git a/src/2geom/chebyshev.cpp b/src/2geom/chebyshev.cpp
index 447c5183f..73baf7b6b 100644
--- a/src/2geom/chebyshev.cpp
+++ b/src/2geom/chebyshev.cpp
@@ -93,7 +93,7 @@ SBasis chebyshev_approximant_interpolating (double (*f)(double,void*),
wr.fa = fa;
wr.fb = fb;
wr.in = in;
- printf("%f %f\n", fa, fb);
+ //printf("%f %f\n", fa, fb);
wr.f = f;
wr.pp = p;
return compose(Linear(in[0], in[1]), Linear(fa, fb)) + chebyshev_approximant(f_interp, order, in, &wr) + Linear(fa, fb);
diff --git a/src/2geom/hvlinesegment.h b/src/2geom/hvlinesegment.h
index ac91ec80a..6c42b06aa 100644
--- a/src/2geom/hvlinesegment.h
+++ b/src/2geom/hvlinesegment.h
@@ -216,7 +216,7 @@ class HLineSegment : public Curve
{
Point ip = initialPoint() * m;
Point ep = finalPoint() * m;
- if (m.onlyScaleAndTranslation()) {
+ if (ip[Y] == ep[Y]) {
return new HLineSegment(ip[X], ep[X], ip[Y]);
} else {
return new LineSegment(ip, ep);
@@ -457,7 +457,7 @@ class VLineSegment : public Curve
{
Point ip = initialPoint() * m;
Point ep = finalPoint() * m;
- if (m.onlyScaleAndTranslation()) {
+ if (ip[X] == ep[X]) {
return new VLineSegment(ip[X], ip[Y], ep[Y]);
} else {
return new LineSegment(ip, ep);
diff --git a/src/2geom/path.cpp b/src/2geom/path.cpp
index 981c9f044..88c7a99b9 100644
--- a/src/2geom/path.cpp
+++ b/src/2geom/path.cpp
@@ -203,11 +203,10 @@ Path::nearestPointPerCurve(Point const& _point) const
{
//return a single nearest point for each curve in this path
std::vector<double> np;
- const Path& _path = *this;
- for (Sequence::const_iterator it = _path.get_curves().begin() ; it != _path.get_curves().end()-1 ; ++it)
+ for (const_iterator it = begin() ; it != end_default(); ++it)
//for (std::vector<Path>::const_iterator it = _path.begin(); it != _path.end(), ++it){
{
- np.push_back((*it)->nearestPoint(_point));
+ np.push_back(it->nearestPoint(_point));
}
return np;
}
diff --git a/src/2geom/svg-path-parser.cpp b/src/2geom/svg-path-parser.cpp
index 071b171b3..691ddf022 100644
--- a/src/2geom/svg-path-parser.cpp
+++ b/src/2geom/svg-path-parser.cpp
@@ -1,4 +1,3 @@
-#line 1 "/home/njh/svn/lib2geom/src/2geom/svg-path-parser.rl"
/**
* \file
* \brief parse SVG path specifications