]> git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/SplashState.h
Load cups into easysw/current.
[thirdparty/cups.git] / pdftops / SplashState.h
1 //========================================================================
2 //
3 // SplashState.h
4 //
5 //========================================================================
6
7 #ifndef SPLASHSTATE_H
8 #define SPLASHSTATE_H
9
10 #include <config.h>
11
12 #ifdef USE_GCC_PRAGMAS
13 #pragma interface
14 #endif
15
16 #include "SplashTypes.h"
17
18 class SplashPattern;
19 class SplashScreen;
20 class SplashClip;
21
22 //------------------------------------------------------------------------
23 // line cap values
24 //------------------------------------------------------------------------
25
26 #define splashLineCapButt 0
27 #define splashLineCapRound 1
28 #define splashLineCapProjecting 2
29
30 //------------------------------------------------------------------------
31 // line join values
32 //------------------------------------------------------------------------
33
34 #define splashLineJoinMiter 0
35 #define splashLineJoinRound 1
36 #define splashLineJoinBevel 2
37
38 //------------------------------------------------------------------------
39 // SplashState
40 //------------------------------------------------------------------------
41
42 class SplashState {
43 public:
44
45 // Create a new state object, initialized with default settings.
46 SplashState(int width, int height);
47
48 // Copy a state object.
49 SplashState *copy() { return new SplashState(this); }
50
51 ~SplashState();
52
53 // Set the stroke pattern. This does not copy <strokePatternA>.
54 void setStrokePattern(SplashPattern *strokePatternA);
55
56 // Set the fill pattern. This does not copy <fillPatternA>.
57 void setFillPattern(SplashPattern *fillPatternA);
58
59 // Set the screen. This does not copy <screenA>.
60 void setScreen(SplashScreen *screenA);
61
62 // Set the line dash pattern. This copies the <lineDashA> array.
63 void setLineDash(SplashCoord *lineDashA, int lineDashLengthA,
64 SplashCoord lineDashPhaseA);
65
66 private:
67
68 SplashState(SplashState *state);
69
70 SplashPattern *strokePattern;
71 SplashPattern *fillPattern;
72 SplashScreen *screen;
73 SplashBlendFunc blendFunc;
74 SplashCoord strokeAlpha;
75 SplashCoord fillAlpha;
76 SplashCoord lineWidth;
77 int lineCap;
78 int lineJoin;
79 SplashCoord miterLimit;
80 SplashCoord flatness;
81 SplashCoord *lineDash;
82 int lineDashLength;
83 SplashCoord lineDashPhase;
84 SplashClip *clip;
85
86 SplashState *next; // used by Splash class
87
88 friend class Splash;
89 };
90
91 #endif