2
//========================================================================
6
// Copyright 1998-2002 Glyph & Cog, LLC
8
//========================================================================
10
#ifndef IMAGEOUTPUTDEV_H
11
#define IMAGEOUTPUTDEV_H
15
#ifdef USE_GCC_PRAGMAS
22
#include "outputdev.h"
26
//------------------------------------------------------------------------
28
//------------------------------------------------------------------------
30
class ImageOutputDev: public OutputDev {
33
// Create an OutputDev which will write images to files named
34
// <fileRoot>-NNN.<type>. Normally, all images are written as PBM
35
// (.pbm) or PPM (.ppm) files. If <dumpJPEG> is set, JPEG images are
36
// written as JPEG (.jpg) files.
37
ImageOutputDev(char *fileRootA, GBool dumpJPEGA);
40
virtual ~ImageOutputDev();
42
// Check if file was successfully created.
43
virtual GBool isOk() { return ok; }
45
// Does this device use beginType3Char/endType3Char? Otherwise,
46
// text in Type 3 fonts will be drawn with drawChar/drawString.
47
virtual GBool interpretType3Chars() { return gFalse; }
49
// Does this device need non-text content?
50
virtual GBool needNonText() { return gFalse; }
52
//---- get info about output device
54
// Does this device use upside-down coordinates?
55
// (Upside-down means (0,0) is the top left corner of the page.)
56
virtual GBool upsideDown() { return gTrue; }
58
// Does this device use drawChar() or drawString()?
59
virtual GBool useDrawChar() { return gFalse; }
62
virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
63
int width, int height, GBool invert,
65
virtual void drawImage(GfxState *state, Object *ref, Stream *str,
66
int width, int height, GfxImageColorMap *colorMap,
67
int *maskColors, GBool inlineImg);
71
char *fileRoot; // root of output file names
72
char *fileName; // buffer for output file names
73
GBool dumpJPEG; // set to dump native JPEG files
74
int imgNum; // current image number
75
GBool ok; // set up ok?