source: trunk/poppler/mypoppler/splash/SplashState.h @ 2

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 16 years ago

First import

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