]>
git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/SplashBitmap.h
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 topDown
= gTrue
);
34 int getWidth() { return width
; }
35 int getHeight() { return height
; }
36 int getRowSize() { return rowSize
; }
37 SplashColorMode
getMode() { return mode
; }
38 SplashColorPtr
getDataPtr() { return data
; }
40 SplashError
writePNMFile(char *fileName
);
42 void getPixel(int x
, int y
, SplashColorPtr pixel
);
46 int width
, height
; // size of bitmap
47 int rowSize
; // size of one row of data, in bytes
48 // - negative for bottom-up bitmaps
49 SplashColorMode mode
; // color mode
50 SplashColorPtr data
; // pointer to row zero of the bitmap data