| 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 |
#include "SplashTypes.h" |
| 15 |
|
| 16 |
class SplashScreen; |
| 17 |
|
| 18 |
//------------------------------------------------------------------------ |
| 19 |
// SplashPattern |
| 20 |
//------------------------------------------------------------------------ |
| 21 |
|
| 22 |
class SplashPattern { |
| 23 |
public: |
| 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 |
|
| 35 |
// Returns true if this pattern object will return the same color |
| 36 |
// value for all pixels. |
| 37 |
virtual GBool isStatic() = 0; |
| 38 |
|
| 39 |
private: |
| 40 |
}; |
| 41 |
|
| 42 |
//------------------------------------------------------------------------ |
| 43 |
// SplashSolidColor |
| 44 |
//------------------------------------------------------------------------ |
| 45 |
|
| 46 |
class SplashSolidColor: public SplashPattern { |
| 47 |
public: |
| 48 |
|
| 49 |
SplashSolidColor(SplashColorPtr colorA); |
| 50 |
|
| 51 |
virtual SplashPattern *copy() { return new SplashSolidColor(color); } |
| 52 |
|
| 53 |
virtual ~SplashSolidColor(); |
| 54 |
|
| 55 |
virtual void getColor(int x, int y, SplashColorPtr c); |
| 56 |
|
| 57 |
virtual GBool isStatic() { return gTrue; } |
| 58 |
|
| 59 |
private: |
| 60 |
|
| 61 |
SplashColor color; |
| 62 |
}; |
| 63 |
|
| 64 |
|
| 65 |
#endif |