1 //========================================================================
5 //========================================================================
7 //========================================================================
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, 2015 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 //========================================================================
24 #ifdef USE_GCC_PRAGMAS
28 #include "SplashTypes.h"
35 //------------------------------------------------------------------------
37 //------------------------------------------------------------------------
39 #define splashLineCapButt 0
40 #define splashLineCapRound 1
41 #define splashLineCapProjecting 2
43 //------------------------------------------------------------------------
45 //------------------------------------------------------------------------
47 #define splashLineJoinMiter 0
48 #define splashLineJoinRound 1
49 #define splashLineJoinBevel 2
51 //------------------------------------------------------------------------
53 //------------------------------------------------------------------------
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); }
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
);
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 GBool multiplyPatternAlpha
;
105 SplashCoord patternStrokeAlpha
;
106 SplashCoord patternFillAlpha
;
107 SplashCoord lineWidth
;
110 SplashCoord miterLimit
;
111 SplashCoord flatness
;
112 SplashCoord
*lineDash
;
114 SplashCoord lineDashPhase
;
117 SplashBitmap
*softMask
;
118 GBool deleteSoftMask
;
119 GBool inNonIsolatedGroup
;
121 GBool strokeOverprint
;
123 Guchar rgbTransferR
[256],
126 Guchar grayTransfer
[256];
128 Guchar cmykTransferC
[256],
132 Guchar deviceNTransfer
[SPOT_NCOMPS
+4][256];
135 GBool overprintAdditive
;
137 SplashState
*next
; // used by Splash class