Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/GfxState.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/GfxState.h | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/GfxState.h b/noncore/unsupported/qpdf/xpdf/GfxState.h index 7fe16ea..328f9a8 100644 --- a/noncore/unsupported/qpdf/xpdf/GfxState.h +++ b/noncore/unsupported/qpdf/xpdf/GfxState.h @@ -1,17 +1,17 @@ //======================================================================== // // GfxState.h // -// Copyright 1996 Derek B. Noonburg +// Copyright 1996-2002 Glyph & Cog, LLC // //======================================================================== #ifndef GFXSTATE_H #define GFXSTATE_H #ifdef __GNUC__ #pragma interface #endif #include "gtypes.h" #include "Object.h" @@ -559,24 +559,58 @@ public: GBool getExtend1() { return extend1; } private: fouble x0, y0, x1, y1; fouble t0, t1; Function *funcs[gfxColorMaxComps]; int nFuncs; GBool extend0, extend1; }; //------------------------------------------------------------------------ +// GfxRadialShading +//------------------------------------------------------------------------ + +class GfxRadialShading: public GfxShading { +public: + + GfxRadialShading(fouble x0A, fouble y0A, fouble r0A, + fouble x1A, fouble y1A, fouble r1A, + fouble t0A, fouble t1A, + Function **funcsA, int nFuncsA, + GBool extend0A, GBool extend1A); + virtual ~GfxRadialShading(); + + static GfxRadialShading *parse(Dict *dict); + + void getCoords(fouble *x0A, fouble *y0A, fouble *r0A, + fouble *x1A, fouble *y1A, fouble *r1A) + { *x0A = x0; *y0A = y0; *r0A = r0; *x1A = x1; *y1A = y1; *r1A = r1; } + fouble getDomain0() { return t0; } + fouble getDomain1() { return t1; } + void getColor(fouble t, GfxColor *color); + GBool getExtend0() { return extend0; } + GBool getExtend1() { return extend1; } + +private: + + fouble x0, y0, r0, x1, y1, r1; + fouble t0, t1; + Function *funcs[gfxColorMaxComps]; + int nFuncs; + GBool extend0, extend1; +}; + +//------------------------------------------------------------------------ // GfxImageColorMap //------------------------------------------------------------------------ class GfxImageColorMap { public: // Constructor. GfxImageColorMap(int bitsA, Object *decode, GfxColorSpace *colorSpaceA); // Destructor. ~GfxImageColorMap(); @@ -774,24 +808,25 @@ public: fouble *getTextMat() { return textMat; } fouble getCharSpace() { return charSpace; } fouble getWordSpace() { return wordSpace; } fouble getHorizScaling() { return horizScaling; } fouble getLeading() { return leading; } fouble getRise() { return rise; } int getRender() { return render; } GfxPath *getPath() { return path; } fouble getCurX() { return curX; } fouble getCurY() { return curY; } void getClipBBox(fouble *xMin, fouble *yMin, fouble *xMax, fouble *yMax) { *xMin = clipXMin; *yMin = clipYMin; *xMax = clipXMax; *yMax = clipYMax; } + void getUserClipBBox(fouble *xMin, fouble *yMin, fouble *xMax, fouble *yMax); fouble getLineX() { return lineX; } fouble getLineY() { return lineY; } // Is there a current point/path? GBool isCurPt() { return path->isCurPt(); } GBool isPath() { return path->isPath(); } // Transforms. void transform(fouble x1, fouble y1, fouble *x2, fouble *y2) { *x2 = ctm[0] * x1 + ctm[2] * y1 + ctm[4]; *y2 = ctm[1] * x1 + ctm[3] * y1 + ctm[5]; } void transformDelta(fouble x1, fouble y1, fouble *x2, fouble *y2) @@ -856,25 +891,25 @@ public: fouble x3, fouble y3) { path->curveTo(x1, y1, x2, y2, curX = x3, curY = y3); } void closePath() { path->close(); curX = path->getLastX(); curY = path->getLastY(); } void clearPath(); // Update clip region. void clip(); // Text position. void textMoveTo(fouble tx, fouble ty) { lineX = tx; lineY = ty; textTransform(tx, ty, &curX, &curY); } - void textShift(fouble tx); + void textShift(fouble tx, fouble ty); void shift(fouble dx, fouble dy); // Push/pop GfxState on/off stack. GfxState *save(); GfxState *restore(); GBool hasSaves() { return saved != NULL; } private: fouble ctm[6]; // coord transform matrix fouble px1, py1, px2, py2; // page corners (user coords) fouble pageWidth, pageHeight; // page size (pixels) |