summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2024-02-10 08:13:48 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2024-02-10 08:13:48 +0000
commit90a8327e9b036ece000905d54a316b792d891e0b (patch)
tree45536c0f5666955912b04bcd20c14a57aad31872 /Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc
parent0357cc55904fda095727bb30f07b68dbf3439f8e (diff)
revert (xpdf 4.05 to xpdf 4.04)
git-svn-id: svn://tug.org/texlive/trunk@69766 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc')
-rw-r--r--Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc61
1 files changed, 7 insertions, 54 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc b/Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc
index 72e8afd4706..4c77765723e 100644
--- a/Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc
+++ b/Build/source/libs/xpdf/xpdf-src/splash/SplashXPath.cc
@@ -8,6 +8,10 @@
#include <aconf.h>
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
#include <stdlib.h>
#include <string.h>
#if HAVE_STD_SORT
@@ -17,7 +21,6 @@
#include "gmempp.h"
#include "SplashMath.h"
#include "SplashPath.h"
-#include "SplashClip.h"
#include "SplashXPath.h"
//------------------------------------------------------------------------
@@ -80,8 +83,7 @@ void SplashXPath::clampCoords(SplashCoord *x, SplashCoord *y) {
SplashXPath::SplashXPath(SplashPath *path, SplashCoord *matrix,
SplashCoord flatness, GBool closeSubpaths,
GBool simplify,
- SplashStrokeAdjustMode strokeAdjMode,
- SplashClip *clip) {
+ SplashStrokeAdjustMode strokeAdjMode) {
SplashXPathPoint *pts;
SplashCoord x0, y0, x1, y1, x2, y2, x3, y3, xsp, ysp, t;
int curSubpath, firstSegInSubpath, i;
@@ -97,7 +99,7 @@ SplashXPath::SplashXPath(SplashPath *path, SplashCoord *matrix,
//--- do stroke adjustment
if (path->hints) {
adjusted = strokeAdjust(pts, path->hints, path->hintsLength,
- strokeAdjMode, clip);
+ strokeAdjMode);
} else {
adjusted = gFalse;
}
@@ -225,8 +227,7 @@ SplashXPath::SplashXPath(SplashPath *path, SplashCoord *matrix,
GBool SplashXPath::strokeAdjust(SplashXPathPoint *pts,
SplashPathHint *hints, int nHints,
- SplashStrokeAdjustMode strokeAdjMode,
- SplashClip *clip) {
+ SplashStrokeAdjustMode strokeAdjMode) {
SplashXPathAdjust *adjusts, *adjust;
SplashPathHint *hint;
SplashCoord x0, y0, x1, y1, x2, y2, x3, y3;
@@ -237,28 +238,6 @@ GBool SplashXPath::strokeAdjust(SplashXPathPoint *pts,
adjusted = gFalse;
- // With CAD-mode stroke adjustment, and a simple rectangular clip
- // region, stroke-adjusted edges that fall slightly outside the clip
- // region are adjusted back inside the clip region. This avoids
- // problems with narrow lines in slightly mismatched clip
- // rectangles, which appear to be generated somewhat commonly by
- // buggy CAD software. (Note: [clip] is NULL when called to build a
- // clip path.)
- GBool clipTweak = clip && clip->getIsSimple() &&
- strokeAdjMode == splashStrokeAdjustCAD;
- SplashCoord cx0 = 0, cx1 = 0, cy0 = 0, cy1 = 0;
- int cxi0 = 0, cxi1 = 0, cyi0 = 0, cyi1 = 0;
- if (clipTweak) {
- cx0 = clip->getXMin();
- cx1 = clip->getXMax();
- cy0 = clip->getYMin();
- cy1 = clip->getYMax();
- cxi0 = clip->getXMinI(strokeAdjMode);
- cxi1 = clip->getXMaxI(strokeAdjMode);
- cyi0 = clip->getYMinI(strokeAdjMode);
- cyi1 = clip->getYMaxI(strokeAdjMode);
- }
-
// set up the stroke adjustment hints
adjusts = (SplashXPathAdjust *)gmallocn(nHints, sizeof(SplashXPathAdjust));
for (i = 0; i < nHints; ++i) {
@@ -303,32 +282,6 @@ GBool SplashXPath::strokeAdjust(SplashXPathPoint *pts,
adjusts[i].x1a = adj1 - d;
adjusts[i].x1b = adj1 + d;
splashStrokeAdjust(adj0, adj1, &xi0, &xi1, strokeAdjMode, w);
- if (clipTweak) {
- SplashCoord c0, c1;
- int ci0, ci1;
- if (adjusts[i].vert) {
- c0 = cx0;
- c1 = cx1;
- ci0 = cxi0;
- ci1 = cxi1;
- } else {
- c0 = cy0;
- c1 = cy1;
- ci0 = cyi0;
- ci1 = cyi1;
- }
- if (adj0 < c0 && c0 < adj1 && adj1 < c1 &&
- adj1 - c0 > (adj1 - adj0) * 0.2 &&
- xi1 <= ci0) {
- xi0 = ci0;
- xi1 = xi0 + 1;
- } else if (c0 < adj0 && adj0 < c1 && c1 < adj1 &&
- c1 - adj0 > (adj1 - adj0) * 0.2 &&
- ci1 < xi0) {
- xi0 = ci1;
- xi1 = ci1 + 1;
- }
- }
adjusts[i].x0 = (SplashCoord)xi0;
// the "minus epsilon" thing here is needed when vector
// antialiasing is turned off -- otherwise stroke adjusted lines