/src/xpdf-4.04/splash/SplashPattern.h
Line | Count | Source (jump to first uncovered line) |
1 | | //======================================================================== |
2 | | // |
3 | | // SplashPattern.h |
4 | | // |
5 | | // Copyright 2003-2013 Glyph & Cog, LLC |
6 | | // |
7 | | //======================================================================== |
8 | | |
9 | | #ifndef SPLASHPATTERN_H |
10 | | #define SPLASHPATTERN_H |
11 | | |
12 | | #include <aconf.h> |
13 | | |
14 | | #ifdef USE_GCC_PRAGMAS |
15 | | #pragma interface |
16 | | #endif |
17 | | |
18 | | #include "SplashTypes.h" |
19 | | |
20 | | class SplashScreen; |
21 | | |
22 | | //------------------------------------------------------------------------ |
23 | | // SplashPattern |
24 | | //------------------------------------------------------------------------ |
25 | | |
26 | | class SplashPattern { |
27 | | public: |
28 | | |
29 | | SplashPattern(); |
30 | | |
31 | | virtual SplashPattern *copy() = 0; |
32 | | |
33 | | virtual ~SplashPattern(); |
34 | | |
35 | | // Return the color value for a specific pixel. |
36 | | virtual void getColor(int x, int y, SplashColorPtr c) = 0; |
37 | | |
38 | | |
39 | | // Returns true if this pattern object will return the same color |
40 | | // value for all pixels. |
41 | | virtual GBool isStatic() = 0; |
42 | | |
43 | | private: |
44 | | }; |
45 | | |
46 | | //------------------------------------------------------------------------ |
47 | | // SplashSolidColor |
48 | | //------------------------------------------------------------------------ |
49 | | |
50 | | class SplashSolidColor: public SplashPattern { |
51 | | public: |
52 | | |
53 | | SplashSolidColor(SplashColorPtr colorA); |
54 | | |
55 | 0 | virtual SplashPattern *copy() { return new SplashSolidColor(color); } |
56 | | |
57 | | virtual ~SplashSolidColor(); |
58 | | |
59 | | virtual void getColor(int x, int y, SplashColorPtr c); |
60 | | |
61 | 0 | virtual GBool isStatic() { return gTrue; } |
62 | | |
63 | | private: |
64 | | |
65 | | SplashColor color; |
66 | | }; |
67 | | |
68 | | |
69 | | #endif |