X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=pdf%2Fxpdf%2FGfx.h;h=bdf56e8610503eff0c999e1a348298a29940873e;hb=f08fe47c41d7b8393c93c14395ef25a0acb57fef;hp=34d8f992c6fa0da2bf5de8c99fea5b8d239d0961;hpb=7aac8dc8533347e21311b15186e0af82f1b22fd6;p=evince.git diff --git a/pdf/xpdf/Gfx.h b/pdf/xpdf/Gfx.h index 34d8f992..bdf56e86 100644 --- a/pdf/xpdf/Gfx.h +++ b/pdf/xpdf/Gfx.h @@ -2,7 +2,7 @@ // // Gfx.h // -// Copyright 1996 Derek B. Noonburg +// Copyright 1996-2002 Glyph & Cog, LLC // //======================================================================== @@ -14,8 +14,10 @@ #endif #include "gtypes.h" +#include "Object.h" class GString; +class XRef; class Array; class Stream; class Parser; @@ -23,10 +25,13 @@ class Dict; class OutputDev; class GfxFontDict; class GfxFont; -struct GfxFontEncoding16; class GfxPattern; +class GfxShading; +class GfxAxialShading; +class GfxRadialShading; class GfxState; class Gfx; +struct PDFRectangle; //------------------------------------------------------------------------ // Gfx @@ -62,7 +67,7 @@ struct Operator { class GfxResources { public: - GfxResources(Dict *resDict, GfxResources *next); + GfxResources(XRef *xref, Dict *resDict, GfxResources *nextA); ~GfxResources(); GfxFont *lookupFont(char *name); @@ -70,6 +75,7 @@ public: GBool lookupXObjectNF(char *name, Object *obj); void lookupColorSpace(char *name, Object *obj); GfxPattern *lookupPattern(char *name); + GfxShading *lookupShading(char *name); GBool lookupGState(char *name, Object *obj); GfxResources *getNext() { return next; } @@ -80,6 +86,7 @@ private: Object xObjDict; Object colorSpaceDict; Object patternDict; + Object shadingDict; Object gStateDict; GfxResources *next; }; @@ -88,24 +95,35 @@ class Gfx { public: // Constructor for regular output. - Gfx(OutputDev *out1, int pageNum, Dict *resDict, - double dpi, double x1, double y1, double x2, double y2, GBool crop, - double cropX1, double cropY1, double cropX2, double cropY2, - int rotate); + Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict, double dpi, + PDFRectangle *box, GBool crop, PDFRectangle *cropBox, int rotate, + GBool printCommandsA); + + // Constructor for a sub-page object. + Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict, + PDFRectangle *box, GBool crop, PDFRectangle *cropBox); - // Destructor. ~Gfx(); // Interpret a stream or array of streams. void display(Object *obj, GBool topLevel = gTrue); - void doWidgetForm(Object *str, double xMin, double yMin, - double xMax, double yMax); + // Display an annotation, given its appearance (a Form XObject) and + // bounding box (in default user space). + void doAnnot(Object *str, double xMin, double yMin, + double xMax, double yMax); + + void pushResources(Dict *resDict); + void popResources(); private: + XRef *xref; // the xref table for this PDF file OutputDev *out; // output device + GBool subPage; // is this a sub-page object? + GBool printCommands; // print the drawing commands (for debugging) GfxResources *res; // resource stack + int updateLevel; GfxState *state; // current graphics state GBool fontChanged; // set if font or text matrix has changed @@ -170,8 +188,10 @@ private: void opCloseFillStroke(Object args[], int numArgs); void opEOFillStroke(Object args[], int numArgs); void opCloseEOFillStroke(Object args[], int numArgs); - void opShFill(Object args[], int numArgs); void doPatternFill(GBool eoFill); + void opShFill(Object args[], int numArgs); + void doAxialShFill(GfxAxialShading *shading); + void doRadialShFill(GfxRadialShading *shading); void doEndPath(); // path clipping operators @@ -203,7 +223,6 @@ private: void opMoveSetShowText(Object args[], int numArgs); void opShowSpaceText(Object args[], int numArgs); void doShowText(GString *s); - int getNextChar16(GfxFontEncoding16 *enc, Guchar *p, int *c16); // XObject operators void opXObject(Object args[], int numArgs);