SplashScreen.h 1.42 KB
Newer Older
Kristian Høgsberg's avatar
Kristian Høgsberg committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//========================================================================
//
// SplashScreen.h
//
//========================================================================

#ifndef SPLASHSCREEN_H
#define SPLASHSCREEN_H

#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif

#include "SplashTypes.h"

//------------------------------------------------------------------------
// SplashScreen
//------------------------------------------------------------------------

class SplashScreen {
public:

23
  SplashScreen(SplashScreenParams *params);
24
  SplashScreen(SplashScreen *screen);
Kristian Høgsberg's avatar
Kristian Høgsberg committed
25 26
  ~SplashScreen();

27
  SplashScreen *copy() { return new SplashScreen(this); }
Kristian Høgsberg's avatar
Kristian Høgsberg committed
28 29 30

  // Return the computed pixel value (0=black, 1=white) for the gray
  // level <value> at (<x>, <y>).
31
  int test(int x, int y, Guchar value);
Kristian Høgsberg's avatar
Kristian Høgsberg committed
32

33 34 35
  // Returns true if value is above the white threshold or below the
  // black threshold, i.e., if the corresponding halftone will be
  // solid white or black.
36
  GBool isStatic(Guchar value);
37

Kristian Høgsberg's avatar
Kristian Høgsberg committed
38 39
private:

40 41 42 43 44 45 46
  void buildDispersedMatrix(int i, int j, int val,
			    int delta, int offset);
  void buildClusteredMatrix();
  int distance(int x0, int y0, int x1, int y1);
  void buildSCDMatrix(int r);

  Guchar *mat;			// threshold matrix
Kristian Høgsberg's avatar
Kristian Høgsberg committed
47
  int size;			// size of the threshold matrix
48
  Guchar minVal;		// any pixel value below minVal generates
49
				//   solid black
50
  Guchar maxVal;		// any pixel value above maxVal generates
51
				//   solid white
Kristian Høgsberg's avatar
Kristian Høgsberg committed
52 53 54
};

#endif