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

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

First import

File size: 1.9 KB
Line 
1//========================================================================
2//
3// SplashPattern.h
4//
5//========================================================================
6
7#ifndef SPLASHPATTERN_H
8#define SPLASHPATTERN_H
9
10#ifdef USE_GCC_PRAGMAS
11#pragma interface
12#endif
13
14#include "SplashTypes.h"
15
16class SplashScreen;
17
18//------------------------------------------------------------------------
19// SplashPattern
20//------------------------------------------------------------------------
21
22class SplashPattern {
23public:
24
25  SplashPattern();
26
27  virtual SplashPattern *copy() = 0;
28
29  virtual ~SplashPattern();
30
31  // Return the color value for a specific pixel.
32  virtual void getColor(int x, int y, SplashColorPtr c) = 0;
33
34  // Returns true if this pattern object will return the same color
35  // value for all pixels.
36  virtual GBool isStatic() = 0;
37
38private:
39};
40
41//------------------------------------------------------------------------
42// SplashSolidColor
43//------------------------------------------------------------------------
44
45class SplashSolidColor: public SplashPattern {
46public:
47
48  SplashSolidColor(SplashColorPtr colorA);
49
50  virtual SplashPattern *copy() { return new SplashSolidColor(color); }
51
52  virtual ~SplashSolidColor();
53
54  virtual void getColor(int x, int y, SplashColorPtr c);
55
56  virtual GBool isStatic() { return gTrue; }
57
58private:
59
60  SplashColor color;
61};
62
63//------------------------------------------------------------------------
64// SplashHalftone
65//------------------------------------------------------------------------
66
67class SplashHalftone: public SplashPattern {
68public:
69
70  SplashHalftone(SplashColorPtr color0A, SplashColorPtr color1A,
71                 SplashScreen *screenA, SplashCoord valueA);
72
73  virtual SplashPattern *copy();
74
75  virtual ~SplashHalftone();
76
77  virtual void getColor(int x, int y, SplashColorPtr c);
78
79  virtual GBool isStatic();
80
81private:
82
83  SplashColor color0, color1;
84  SplashScreen *screen;
85  SplashCoord value;
86};
87
88#endif
Note: See TracBrowser for help on using the repository browser.