diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-08-13 07:14:48 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-08-13 07:14:48 +0000 |
commit | 4b4995cda35627e06c43e25ecbe07c1bc1859bb5 (patch) | |
tree | 143ed02a389bab62f44043a54cbc70f69e312e2f /Build/source/libs/xpdf/xpdf-src/splash/SplashPath.cc | |
parent | 00d00899c484b81967558f43c4fe4a896ffdf610 (diff) |
xpdf 4.00
git-svn-id: svn://tug.org/texlive/trunk@45031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/splash/SplashPath.cc')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/splash/SplashPath.cc | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/splash/SplashPath.cc b/Build/source/libs/xpdf/xpdf-src/splash/SplashPath.cc index 4ee8be02809..8bf2575a083 100644 --- a/Build/source/libs/xpdf/xpdf-src/splash/SplashPath.cc +++ b/Build/source/libs/xpdf/xpdf-src/splash/SplashPath.cc @@ -14,6 +14,7 @@ #include <string.h> #include "gmem.h" +#include "gmempp.h" #include "SplashErrorCodes.h" #include "SplashPath.h" @@ -156,7 +157,8 @@ SplashError SplashPath::close(GBool force) { } void SplashPath::addStrokeAdjustHint(int ctrl0, int ctrl1, - int firstPt, int lastPt) { + int firstPt, int lastPt, + GBool projectingCap) { if (hintsLength == hintsSize) { hintsSize = hintsLength ? 2 * hintsLength : 8; hints = (SplashPathHint *)greallocn(hints, hintsSize, @@ -166,6 +168,7 @@ void SplashPath::addStrokeAdjustHint(int ctrl0, int ctrl1, hints[hintsLength].ctrl1 = ctrl1; hints[hintsLength].firstPt = firstPt; hints[hintsLength].lastPt = lastPt; + hints[hintsLength].projectingCap = projectingCap; ++hintsLength; } @@ -186,3 +189,25 @@ GBool SplashPath::getCurPt(SplashCoord *x, SplashCoord *y) { *y = pts[length - 1].y; return gTrue; } + +GBool SplashPath::containsZeroLengthSubpaths() { + GBool zeroLength; + int i; + + zeroLength = gTrue; // make gcc happy + for (i = 0; i < length; ++i) { + if (flags[i] & splashPathFirst) { + zeroLength = gTrue; + } else { + if (pts[i].x != pts[i-1].x || pts[i].y != pts[i-1].y) { + zeroLength = gFalse; + } + if (flags[i] & splashPathLast) { + if (zeroLength) { + return gTrue; + } + } + } + } + return gFalse; +} |