a patch for ttc fonts with bad index
[luatex.git] / source / libs / poppler / poppler-0.36.0 / splash / SplashState.h
blob2c603531cfd6c8abc705f79179af5d247e7ff277
1 //========================================================================
2 //
3 // SplashState.h
4 //
5 //========================================================================
7 //========================================================================
8 //
9 // Modified under the Poppler project - http://poppler.freedesktop.org
11 // All changes made under the Poppler project to this file are licensed
12 // under GPL version 2 or later
14 // Copyright (C) 2011, 2012 Thomas Freitag <Thomas.Freitag@alfa.de>
16 // To see a description of the changes please see the Changelog file that
17 // came with your tarball or type make ChangeLog if you are building from git
19 //========================================================================
21 #ifndef SPLASHSTATE_H
22 #define SPLASHSTATE_H
24 #ifdef USE_GCC_PRAGMAS
25 #pragma interface
26 #endif
28 #include "SplashTypes.h"
30 class SplashPattern;
31 class SplashScreen;
32 class SplashClip;
33 class SplashBitmap;
35 //------------------------------------------------------------------------
36 // line cap values
37 //------------------------------------------------------------------------
39 #define splashLineCapButt 0
40 #define splashLineCapRound 1
41 #define splashLineCapProjecting 2
43 //------------------------------------------------------------------------
44 // line join values
45 //------------------------------------------------------------------------
47 #define splashLineJoinMiter 0
48 #define splashLineJoinRound 1
49 #define splashLineJoinBevel 2
51 //------------------------------------------------------------------------
52 // SplashState
53 //------------------------------------------------------------------------
55 class SplashState {
56 public:
58 // Create a new state object, initialized with default settings.
59 SplashState(int width, int height, GBool vectorAntialias,
60 SplashScreenParams *screenParams);
61 SplashState(int width, int height, GBool vectorAntialias,
62 SplashScreen *screenA);
64 // Copy a state object.
65 SplashState *copy() { return new SplashState(this); }
67 ~SplashState();
69 // Set the stroke pattern. This does not copy <strokePatternA>.
70 void setStrokePattern(SplashPattern *strokePatternA);
72 // Set the fill pattern. This does not copy <fillPatternA>.
73 void setFillPattern(SplashPattern *fillPatternA);
75 // Set the screen. This does not copy <screenA>.
76 void setScreen(SplashScreen *screenA);
78 // Set the line dash pattern. This copies the <lineDashA> array.
79 void setLineDash(SplashCoord *lineDashA, int lineDashLengthA,
80 SplashCoord lineDashPhaseA);
82 // Set the soft mask bitmap.
83 void setSoftMask(SplashBitmap *softMaskA);
85 // Set the overprint parametes.
86 void setFillOverprint(GBool fillOverprintA) { fillOverprint = fillOverprintA; }
87 void setStrokeOverprint(GBool strokeOverprintA) { strokeOverprint = strokeOverprintA; }
88 void setOverprintMode(int overprintModeA) { overprintMode = overprintModeA; }
90 // Set the transfer function.
91 void setTransfer(Guchar *red, Guchar *green, Guchar *blue, Guchar *gray);
93 private:
95 SplashState(SplashState *state);
97 SplashCoord matrix[6];
98 SplashPattern *strokePattern;
99 SplashPattern *fillPattern;
100 SplashScreen *screen;
101 SplashBlendFunc blendFunc;
102 SplashCoord strokeAlpha;
103 SplashCoord fillAlpha;
104 SplashCoord lineWidth;
105 int lineCap;
106 int lineJoin;
107 SplashCoord miterLimit;
108 SplashCoord flatness;
109 SplashCoord *lineDash;
110 int lineDashLength;
111 SplashCoord lineDashPhase;
112 GBool strokeAdjust;
113 SplashClip *clip;
114 SplashBitmap *softMask;
115 GBool deleteSoftMask;
116 GBool inNonIsolatedGroup;
117 GBool fillOverprint;
118 GBool strokeOverprint;
119 int overprintMode;
120 Guchar rgbTransferR[256],
121 rgbTransferG[256],
122 rgbTransferB[256];
123 Guchar grayTransfer[256];
124 #if SPLASH_CMYK
125 Guchar cmykTransferC[256],
126 cmykTransferM[256],
127 cmykTransferY[256],
128 cmykTransferK[256];
129 Guchar deviceNTransfer[SPOT_NCOMPS+4][256];
130 #endif
131 Guint overprintMask;
132 GBool overprintAdditive;
134 SplashState *next; // used by Splash class
136 friend class Splash;
139 #endif