From 9c241c5d2d9413361d32567876c35b2b9e2754c9 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 20 Mar 2009 07:45:16 +0000 Subject: new build system git-svn-id: svn://tug.org/texlive/trunk@12446 c570f23f-e606-0410-a88d-b1316a301751 --- .../xpdf/xpdf-3.02/splash/SplashXPathScanner.h | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Build/source/libs/xpdf/xpdf-3.02/splash/SplashXPathScanner.h (limited to 'Build/source/libs/xpdf/xpdf-3.02/splash/SplashXPathScanner.h') diff --git a/Build/source/libs/xpdf/xpdf-3.02/splash/SplashXPathScanner.h b/Build/source/libs/xpdf/xpdf-3.02/splash/SplashXPathScanner.h new file mode 100644 index 00000000000..ab02fcc999e --- /dev/null +++ b/Build/source/libs/xpdf/xpdf-3.02/splash/SplashXPathScanner.h @@ -0,0 +1,87 @@ +//======================================================================== +// +// SplashXPathScanner.h +// +//======================================================================== + +#ifndef SPLASHXPATHSCANNER_H +#define SPLASHXPATHSCANNER_H + +#include + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include "SplashTypes.h" + +class SplashXPath; +class SplashBitmap; +struct SplashIntersect; + +//------------------------------------------------------------------------ +// SplashXPathScanner +//------------------------------------------------------------------------ + +class SplashXPathScanner { +public: + + // Create a new SplashXPathScanner object. must be sorted. + SplashXPathScanner(SplashXPath *xPathA, GBool eoA); + + ~SplashXPathScanner(); + + // Return the path's bounding box. + void getBBox(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA) + { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; } + + // Return the path's bounding box. + void getBBoxAA(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA); + + // Return the min/max x values for the span at . + void getSpanBounds(int y, int *spanXMin, int *spanXMax); + + // Returns true if (,) is inside the path. + GBool test(int x, int y); + + // Returns true if the entire span ([,], ) is inside the + // path. + GBool testSpan(int x0, int x1, int y); + + // Returns the next span inside the path at . If is + // different than the previous call to getNextSpan, this returns the + // first span at ; otherwise it returns the next span (relative + // to the previous call to getNextSpan). Returns false if there are + // no more spans at . + GBool getNextSpan(int y, int *x0, int *x1); + + // Renders one anti-aliased line into . Returns the min and + // max x coordinates with non-zero pixels in and . + void renderAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y); + + // Clips an anti-aliased line by setting pixels to zero. On entry, + // all non-zero pixels are between and . This function + // will update and . + void clipAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y); + +private: + + void computeIntersections(int y); + + SplashXPath *xPath; + GBool eo; + int xMin, yMin, xMax, yMax; + + int interY; // current y value + int interIdx; // current index into - used by + // getNextSpan + int interCount; // current EO/NZWN counter - used by + // getNextSpan + int xPathIdx; // current index into - used by + // computeIntersections + SplashIntersect *inter; // intersections array for + int interLen; // number of intersections in + int interSize; // size of the array +}; + +#endif -- cgit v1.2.3