]> www.fi.muni.cz Git - evince.git/blob - pdf/splash/SplashState.h
Yay! find works now... Now to find bugs...
[evince.git] / pdf / splash / SplashState.h
1 //========================================================================
2 //
3 // SplashState.h
4 //
5 //========================================================================
6
7 #ifndef SPLASHSTATE_H
8 #define SPLASHSTATE_H
9
10 #include <aconf.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   SplashCoord lineWidth;
74   int lineCap;
75   int lineJoin;
76   SplashCoord miterLimit;
77   SplashCoord flatness;
78   SplashCoord *lineDash;
79   int lineDashLength;
80   SplashCoord lineDashPhase;
81   SplashClip *clip;
82
83   SplashState *next;            // used by Splash class
84
85   friend class Splash;
86 };
87
88 #endif