]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/GfxState.h
Reused eog HIG dialog in GPdf.
[evince.git] / pdf / xpdf / GfxState.h
index b1f6f28ec9d32954e9e2a5f456496ac2f7835d81..a0b1d14aee56440b9e05a0851e4d7e27739150ef 100644 (file)
@@ -2,14 +2,16 @@
 //
 // GfxState.h
 //
-// Copyright 1996-2002 Glyph & Cog, LLC
+// Copyright 1996-2003 Glyph & Cog, LLC
 //
 //========================================================================
 
 #ifndef GFXSTATE_H
 #define GFXSTATE_H
 
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
 #pragma interface
 #endif
 
@@ -19,7 +21,7 @@
 
 class Array;
 class GfxFont;
-struct PDFRectangle;
+class PDFRectangle;
 
 //------------------------------------------------------------------------
 // GfxColor
@@ -51,6 +53,8 @@ struct GfxCMYK {
 // GfxColorSpace
 //------------------------------------------------------------------------
 
+// NB: The nGfxColorSpaceModes constant and the gfxColorSpaceModeNames
+// array defined in GfxState.cc must match this enum.
 enum GfxColorSpaceMode {
   csDeviceGray,
   csCalGray,
@@ -89,6 +93,12 @@ public:
   virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
                                int maxImgPixel);
 
+  // Return the number of color space modes
+  static int getNumColorSpaceModes();
+
+  // Return the name of the <idx>th color space mode.
+  static char *getColorSpaceModeName(int idx);
+
 private:
 };
 
@@ -342,6 +352,7 @@ public:
   GfxColorSpace *getBase() { return base; }
   int getIndexHigh() { return indexHigh; }
   Guchar *getLookup() { return lookup; }
+  GfxColor *mapColorToBase(GfxColor *color, GfxColor *baseColor);
 
 private:
 
@@ -406,7 +417,9 @@ public:
   virtual int getNComps() { return nComps; }
 
   // DeviceN-specific access.
+  GString *getColorantName(int i) { return names[i]; }
   GfxColorSpace *getAlt() { return alt; }
+  Function *getTintTransformFunc() { return func; }
 
 private:
 
@@ -632,6 +645,7 @@ public:
   void getGray(Guchar *x, double *gray);
   void getRGB(Guchar *x, GfxRGB *rgb);
   void getCMYK(Guchar *x, GfxCMYK *cmyk);
+  void getColor(Guchar *x, GfxColor *color);
 
 private:
 
@@ -898,6 +912,7 @@ public:
   void clip();
 
   // Text position.
+  void textSetPos(double tx, double ty) { lineX = tx; lineY = ty; }
   void textMoveTo(double tx, double ty)
     { lineX = tx; lineY = ty; textTransform(tx, ty, &curX, &curY); }
   void textShift(double tx, double ty);