summaryrefslogtreecommitdiffstats
path: root/src/display/curve.cpp
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/display/curve.cpp
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/display/curve.cpp')
-rw-r--r--src/display/curve.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index 7d7dbc987..1b54c981c 100644
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
@@ -51,10 +51,10 @@ SPCurve::new_from_rect(Geom::Rect const &rect)
Geom::Point p = rect.corner(0);
c->moveto(p);
- for (int i=3; i>=0; i--) {
+ for (int i=3; i>=1; i--) {
c->lineto(rect.corner(i));
}
- c->closepath_current();
+ c->closepath();
return c;
}
@@ -285,7 +285,11 @@ SPCurve::closepath()
void
SPCurve::closepath_current()
{
- _pathv.back().setFinal(_pathv.back().initialPoint());
+ if (_pathv.back().size() > 0 && dynamic_cast<Geom::LineSegment const *>(&_pathv.back().back_open())) {
+ _pathv.back().erase_last();
+ } else {
+ _pathv.back().setFinal(_pathv.back().initialPoint());
+ }
_pathv.back().close(true);
}