Bringing apdf from vendor into main branch.
[AROS-Contrib.git] / apdf / splash / SplashPattern.h
blobfb633dac982dac655d33ea80d1123bf992592e98
1 //========================================================================
2 //
3 // SplashPattern.h
4 //
5 //========================================================================
7 #ifndef SPLASHPATTERN_H
8 #define SPLASHPATTERN_H
10 #include <aconf.h>
12 #ifdef USE_GCC_PRAGMAS
13 #pragma interface
14 #endif
16 #include "SplashTypes.h"
18 class SplashScreen;
20 //------------------------------------------------------------------------
21 // SplashPattern
22 //------------------------------------------------------------------------
24 class SplashPattern {
25 public:
27 SplashPattern();
29 virtual SplashPattern *copy() = 0;
31 virtual ~SplashPattern();
33 // Return the color value for a specific pixel.
34 virtual void getColor(int x, int y, SplashColorPtr c) = 0;
36 // Returns true if this pattern object will return the same color
37 // value for all pixels.
38 virtual GBool isStatic() = 0;
40 private:
43 //------------------------------------------------------------------------
44 // SplashSolidColor
45 //------------------------------------------------------------------------
47 class SplashSolidColor: public SplashPattern {
48 public:
50 SplashSolidColor(SplashColorPtr colorA);
52 virtual SplashPattern *copy() { return new SplashSolidColor(color); }
54 virtual ~SplashSolidColor();
56 virtual void getColor(int x, int y, SplashColorPtr c);
58 virtual GBool isStatic() { return gTrue; }
60 private:
62 SplashColor color;
65 //------------------------------------------------------------------------
66 // SplashHalftone
67 //------------------------------------------------------------------------
69 class SplashHalftone: public SplashPattern {
70 public:
72 SplashHalftone(SplashColorPtr color0A, SplashColorPtr color1A,
73 SplashScreen *screenA, SplashCoord valueA);
75 virtual SplashPattern *copy();
77 virtual ~SplashHalftone();
79 virtual void getColor(int x, int y, SplashColorPtr c);
81 virtual GBool isStatic();
83 private:
85 SplashColor color0, color1;
86 SplashScreen *screen;
87 SplashCoord value;
90 #endif