1 //========================================================================
5 //========================================================================
10 #pragma implementation
13 #include "SplashMath.h"
14 #include "SplashScreen.h"
15 #include "SplashPattern.h"
17 //------------------------------------------------------------------------
19 //------------------------------------------------------------------------
21 SplashPattern::SplashPattern() {
24 SplashPattern::~SplashPattern() {
27 //------------------------------------------------------------------------
29 //------------------------------------------------------------------------
31 SplashSolidColor::SplashSolidColor(SplashColorPtr colorA
) {
32 splashColorCopy(color
, colorA
);
35 SplashSolidColor::~SplashSolidColor() {
38 void SplashSolidColor::getColor(int x
, int y
, SplashColorPtr c
) {
39 splashColorCopy(c
, color
);
42 //------------------------------------------------------------------------
44 //------------------------------------------------------------------------
46 SplashHalftone::SplashHalftone(SplashColorPtr color0A
, SplashColorPtr color1A
,
47 SplashScreen
*screenA
, SplashCoord valueA
) {
48 splashColorCopy(color0
, color0A
);
49 splashColorCopy(color1
, color1A
);
54 SplashPattern
*SplashHalftone::copy() {
55 return new SplashHalftone(color0
, color1
, screen
->copy(), value
);
58 SplashHalftone::~SplashHalftone() {
62 void SplashHalftone::getColor(int x
, int y
, SplashColorPtr c
) {
63 splashColorCopy(c
, screen
->test(x
, y
, value
) ? color1
: color0
);
66 GBool
SplashHalftone::isStatic() {
67 return screen
->isStatic(value
);