summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-src/splash/SplashXPathScanner.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/splash/SplashXPathScanner.h')
-rw-r--r--Build/source/libs/xpdf/xpdf-src/splash/SplashXPathScanner.h61
1 files changed, 35 insertions, 26 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/splash/SplashXPathScanner.h b/Build/source/libs/xpdf/xpdf-src/splash/SplashXPathScanner.h
index 519ff4dfcac..39cc0eb022a 100644
--- a/Build/source/libs/xpdf/xpdf-src/splash/SplashXPathScanner.h
+++ b/Build/source/libs/xpdf/xpdf-src/splash/SplashXPathScanner.h
@@ -16,9 +16,15 @@
#endif
#include "SplashTypes.h"
+#include "SplashXPath.h"
class GList;
-class SplashXPath;
+
+//------------------------------------------------------------------------
+
+// Set this to 0 for antialiasing with 16 levels of gray.
+// Set it to 1 for (much slower) antialiasing with 256 levels of gray.
+#define ANTIALIAS_256 0
//------------------------------------------------------------------------
// SplashXPathScanner
@@ -28,48 +34,51 @@ class SplashXPathScanner {
public:
// Create a new SplashXPathScanner object. <xPathA> must be sorted.
- SplashXPathScanner(SplashXPath *xPathA, GBool eoA,
+ SplashXPathScanner(SplashXPath *xPathA, GBool eo,
int yMinA, int yMaxA);
~SplashXPathScanner();
// Compute shape values for a scan line. Fills in line[] with shape
// values for one scan line: ([x0, x1], y). The values are in [0,
- // 255].
- void getSpan(Guchar *line, int y, int x0, int x1);
+ // 255]. Also returns the min/max x positions with non-zero shape
+ // values.
+ void getSpan(Guchar *line, int y, int x0, int x1, int *xMin, int *xMax);
// Like getSpan(), but uses the values 0 and 255 only. Writes 255
// for all pixels which include non-zero area inside the path.
- void getSpanBinary(Guchar *line, int y, int x0, int x1);
+ void getSpanBinary(Guchar *line, int y, int x0, int x1,
+ int *xMin, int *xMax);
private:
- inline void addArea(Guchar *line, int x, SplashCoord a);
- void drawTrapezoid(Guchar *line, int xMin, int xMax,
- SplashCoord y0, SplashCoord y1,
- SplashCoord xa0, SplashCoord xa1, SplashCoord dydxa,
- SplashCoord xb0, SplashCoord xb1, SplashCoord dydxb);
- SplashCoord areaLeft(int xp,
- SplashCoord x0, SplashCoord y0,
- SplashCoord x1, SplashCoord y1,
- SplashCoord dydx);
- SplashCoord areaRight(int xp,
- SplashCoord x0, SplashCoord y0,
- SplashCoord x1, SplashCoord y1,
- SplashCoord dydx);
- void drawRectangle(Guchar *line, int xMin, int xMax,
- SplashCoord y0, SplashCoord y1,
- SplashCoord x0, SplashCoord x1);
- void sortActiveSegs();
- void insertActiveSeg(SplashXPathSeg *seg);
+ void insertSegmentBefore(SplashXPathSeg *s, SplashXPathSeg *sNext);
+ void removeSegment(SplashXPathSeg *s);
+ void moveSegmentAfter(SplashXPathSeg *s, SplashXPathSeg *sPrev);
+ void reset(GBool aa, GBool aaChanged);
+ void skip(int newYBottomI, GBool aa);
+ void advance(GBool aa);
+ void generatePixels(int x0, int x1, Guchar *line, int *xMin, int *xMax);
+ void generatePixelsBinary(int x0, int x1, Guchar *line,
+ int *xMin, int *xMax);
+ void drawRectangleSpan(Guchar *line, int y, int x0, int x1,
+ int *xMin, int *xMax);
+ void drawRectangleSpanBinary(Guchar *line, int y, int x0, int x1,
+ int *xMin, int *xMax);
SplashXPath *xPath;
- GBool eo;
+ int eoMask;
int yMin, yMax;
+ int rectX0I, rectY0I, rectX1I, rectY1I;
+
+ SplashXPathSeg preSeg, postSeg;
+ SplashXPathSeg *pre, *post;
- GList *activeSegs; // [SplashXPathSeg]
+ GBool resetDone;
+ GBool resetAA;
int nextSeg;
- int yNext;
+ int yTopI, yBottomI;
+ SplashCoord yTop, yBottom;
};
#endif