1 //========================================================================
5 //========================================================================
12 #ifdef USE_GCC_PRAGMAS
16 #include "SplashTypes.h"
18 //------------------------------------------------------------------------
20 //------------------------------------------------------------------------
25 // Create a new bitmap. It will have <widthA> x <heightA> pixels in
26 // color mode <modeA>. Rows will be padded out to a multiple of
27 // <rowPad> bytes. If <topDown> is false, the bitmap will be stored
28 // upside-down, i.e., with the last row first in memory.
29 SplashBitmap(int widthA
, int heightA
, int rowPad
,
30 SplashColorMode modeA
, GBool alphaA
,
31 GBool topDown
= gTrue
);
35 int getWidth() { return width
; }
36 int getHeight() { return height
; }
37 int getRowSize() { return rowSize
; }
38 int getAlphaRowSize() { return width
; }
39 SplashColorMode
getMode() { return mode
; }
40 SplashColorPtr
getDataPtr() { return data
; }
41 Guchar
*getAlphaPtr() { return alpha
; }
43 SplashError
writePNMFile(char *fileName
);
45 void getPixel(int x
, int y
, SplashColorPtr pixel
);
46 Guchar
getAlpha(int x
, int y
);
50 int width
, height
; // size of bitmap
51 int rowSize
; // size of one row of data, in bytes
52 // - negative for bottom-up bitmaps
53 SplashColorMode mode
; // color mode
54 SplashColorPtr data
; // pointer to row zero of the color data
55 Guchar
*alpha
; // pointer to row zero of the alpha data