Various Datatypes.
[AROS-Contrib.git] / arospdf / xpdf / ImageOutputDev.h
blob704bc75b92f3ad3f79dea1321a5dfd834e509825
1 //========================================================================
2 //
3 // ImageOutputDev.h
4 //
5 // Copyright 1998-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef IMAGEOUTPUTDEV_H
10 #define IMAGEOUTPUTDEV_H
12 #include <aconf.h>
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
18 #include <stdio.h>
19 #include "gtypes.h"
20 #include "OutputDev.h"
22 class GfxState;
24 //------------------------------------------------------------------------
25 // ImageOutputDev
26 //------------------------------------------------------------------------
28 class ImageOutputDev: public OutputDev {
29 public:
31 // Create an OutputDev which will write images to files named
32 // <fileRoot>-NNN.<type>. Normally, all images are written as PBM
33 // (.pbm) or PPM (.ppm) files. If <dumpJPEG> is set, JPEG images are
34 // written as JPEG (.jpg) files.
35 ImageOutputDev(char *fileRootA, GBool dumpJPEGA);
37 // Destructor.
38 virtual ~ImageOutputDev();
40 // Check if file was successfully created.
41 virtual GBool isOk() { return ok; }
43 // Does this device use beginType3Char/endType3Char? Otherwise,
44 // text in Type 3 fonts will be drawn with drawChar/drawString.
45 virtual GBool interpretType3Chars() { return gFalse; }
47 // Does this device need non-text content?
48 virtual GBool needNonText() { return gTrue; }
50 //---- get info about output device
52 // Does this device use upside-down coordinates?
53 // (Upside-down means (0,0) is the top left corner of the page.)
54 virtual GBool upsideDown() { return gTrue; }
56 // Does this device use drawChar() or drawString()?
57 virtual GBool useDrawChar() { return gFalse; }
59 //----- image drawing
60 virtual void drawImageMask(GfxState *state, xObject *ref, Stream *str,
61 int width, int height, GBool invert,
62 GBool inlineImg);
63 virtual void drawImage(GfxState *state, xObject *ref, Stream *str,
64 int width, int height, GfxImageColorMap *colorMap,
65 int *maskColors, GBool inlineImg);
67 private:
69 char *fileRoot; // root of output file names
70 char *fileName; // buffer for output file names
71 GBool dumpJPEG; // set to dump native JPEG files
72 int imgNum; // current image number
73 GBool ok; // set up ok?
76 #endif