splash/SplashPath.cc | 5 +++-- splash/SplashPath.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-)
New commits: commit 2547ec60db6d954e5c8318e30fcc54f70bcfa95c Author: Albert Astals Cid <[email protected]> Date: Wed Aug 31 21:05:11 2011 +0200 xpdf303: Add GBool force = gFalse to SplashPath::close diff --git a/splash/SplashPath.cc b/splash/SplashPath.cc index 261f778..bc4ccd5 100644 --- a/splash/SplashPath.cc +++ b/splash/SplashPath.cc @@ -136,11 +136,12 @@ SplashError SplashPath::curveTo(SplashCoord x1, SplashCoord y1, return splashOk; } -SplashError SplashPath::close() { +SplashError SplashPath::close(GBool force) { if (noCurrentPoint()) { return splashErrNoCurPt; } - if (curSubpath == length - 1 || + if (force || + curSubpath == length - 1 || pts[length - 1].x != pts[curSubpath].x || pts[length - 1].y != pts[curSubpath].y) { lineTo(pts[curSubpath].x, pts[curSubpath].y); diff --git a/splash/SplashPath.h b/splash/SplashPath.h index 991e114..81273c6 100644 --- a/splash/SplashPath.h +++ b/splash/SplashPath.h @@ -77,8 +77,10 @@ public: SplashCoord x2, SplashCoord y2, SplashCoord x3, SplashCoord y3); - // Close the last subpath, adding a line segment if necessary. - SplashError close(); + // Close the last subpath, adding a line segment if necessary. If + // <force> is true, this adds a line segment even if the current + // point is equal to the first point in the subpath. + SplashError close(GBool force = gFalse); // Add a stroke adjustment hint. The controlling segments are // <ctrl0> and <ctrl1> (where segments are identified by their first _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
