oops.. only build it when it _is_ valid.
[AROS-Contrib.git] / arospdf / splash / SplashScreen.h
blob2baa9b5d73b05e6784c41acc15fe0a4eed9716a2
1 //========================================================================
2 //
3 // SplashScreen.h
4 //
5 //========================================================================
7 #ifndef SPLASHSCREEN_H
8 #define SPLASHSCREEN_H
10 #include <aconf.h>
12 #ifdef USE_GCC_PRAGMAS
13 #pragma interface
14 #endif
16 #include "SplashTypes.h"
18 //------------------------------------------------------------------------
19 // SplashScreen
20 //------------------------------------------------------------------------
22 class SplashScreen {
23 public:
25 SplashScreen(SplashScreenParams *params);
26 SplashScreen(SplashScreen *screen);
27 ~SplashScreen();
29 SplashScreen *copy() { return new SplashScreen(this); }
31 // Return the computed pixel value (0=black, 1=white) for the gray
32 // level <value> at (<x>, <y>).
33 int test(int x, int y, Guchar value);
35 // Returns true if value is above the white threshold or below the
36 // black threshold, i.e., if the corresponding halftone will be
37 // solid white or black.
38 GBool isStatic(Guchar value);
40 private:
42 void buildDispersedMatrix(int i, int j, int val,
43 int delta, int offset);
44 void buildClusteredMatrix();
45 int distance(int x0, int y0, int x1, int y1);
46 void buildSCDMatrix(int r);
48 Guchar *mat; // threshold matrix
49 int size; // size of the threshold matrix
50 Guchar minVal; // any pixel value below minVal generates
51 // solid black
52 Guchar maxVal; // any pixel value above maxVal generates
53 // solid white
56 #endif