X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FGfx.h;fp=pdf2swf%2Fxpdf%2FGfx.h;h=168206d52ca3d9f16b727287e84954e315f51946;hb=85c46a8011c7fd5e4bda282266006c972ea7606b;hp=2e40a57374a3b6fb3d77129a42151a057578a206;hpb=b0d012f83219d898e9cd92281d9996bc9ff13b5f;p=swftools.git diff --git a/pdf2swf/xpdf/Gfx.h b/pdf2swf/xpdf/Gfx.h index 2e40a57..168206d 100644 --- a/pdf2swf/xpdf/Gfx.h +++ b/pdf2swf/xpdf/Gfx.h @@ -33,6 +33,9 @@ class GfxShading; class GfxFunctionShading; class GfxAxialShading; class GfxRadialShading; +class GfxGouraudTriangleShading; +class GfxPatchMeshShading; +struct GfxPatch; class GfxState; struct GfxColor; class Gfx; @@ -101,14 +104,14 @@ public: // Constructor for regular output. Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict, - double hDPI, double vDPI, PDFRectangle *box, GBool crop, + double hDPI, double vDPI, PDFRectangle *box, PDFRectangle *cropBox, int rotate, GBool (*abortCheckCbkA)(void *data) = NULL, void *abortCheckCbkDataA = NULL); // Constructor for a sub-page object. Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict, - PDFRectangle *box, GBool crop, PDFRectangle *cropBox, + PDFRectangle *box, PDFRectangle *cropBox, GBool (*abortCheckCbkA)(void *data) = NULL, void *abortCheckCbkDataA = NULL); @@ -128,6 +131,9 @@ public: // Restore graphics state. void restoreState(); + // Get the current graphics state object. + GfxState *getState() { return state; } + private: XRef *xref; // the xref table for this PDF file @@ -216,6 +222,13 @@ private: GfxColor *colors, int depth); void doAxialShFill(GfxAxialShading *shading); void doRadialShFill(GfxRadialShading *shading); + void doGouraudTriangleShFill(GfxGouraudTriangleShading *shading); + void gouraudFillTriangle(double x0, double y0, GfxColor *color0, + double x1, double y1, GfxColor *color1, + double x2, double y2, GfxColor *color2, + int nComps, int depth); + void doPatchMeshShFill(GfxPatchMeshShading *shading); + void fillPatch(GfxPatch *patch, int nComps, int depth); void doEndPath(); // path clipping operators