source: trunk/poppler/mypoppler/splash/SplashBitmap.h @ 2

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 16 years ago

First import

File size: 1.4 KB
Line 
1//========================================================================
2//
3// SplashBitmap.h
4//
5//========================================================================
6
7#ifndef SPLASHBITMAP_H
8#define SPLASHBITMAP_H
9
10#ifdef USE_GCC_PRAGMAS
11#pragma interface
12#endif
13
14#include "SplashTypes.h"
15
16//------------------------------------------------------------------------
17// SplashBitmap
18//------------------------------------------------------------------------
19
20class SplashBitmap {
21public:
22
23  // Create a new bitmap.  It will have <widthA> x <heightA> pixels in
24  // color mode <modeA>.  Rows will be padded out to a multiple of
25  // <rowPad> bytes.  If <topDown> is false, the bitmap will be stored
26  // upside-down, i.e., with the last row first in memory.
27  SplashBitmap(int widthA, int heightA, int rowPad,
28               SplashColorMode modeA, GBool topDown = gTrue);
29
30  ~SplashBitmap();
31
32  int getWidth() { return width; }
33  int getHeight() { return height; }
34  int getRowSize() { return rowSize; }
35  SplashColorMode getMode() { return mode; }
36  SplashColorPtr getDataPtr() { return data; }
37
38  SplashError writePNMFile(char *fileName);
39
40  void getPixel(int x, int y, SplashColorPtr pixel);
41
42private:
43
44  int width, height;            // size of bitmap
45  int rowSize;                  // size of one row of data, in bytes
46                                //   - negative for bottom-up bitmaps
47  SplashColorMode mode;         // color mode
48  SplashColorPtr data;          // pointer to row zero of the bitmap data
49
50  friend class Splash;
51};
52
53#endif
Note: See TracBrowser for help on using the repository browser.