1
//========================================================================
5
// Copyright 1998-2003 Glyph & Cog, LLC
7
//========================================================================
9
#ifndef IMAGEOUTPUTDEV_H
10
#define IMAGEOUTPUTDEV_H
14
#ifdef USE_GCC_PRAGMAS
20
#include "OutputDev.h"
24
//------------------------------------------------------------------------
26
//------------------------------------------------------------------------
28
class ImageOutputDev: public OutputDev {
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);
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; }
60
virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
61
int width, int height, GBool invert,
63
virtual void drawImage(GfxState *state, Object *ref, Stream *str,
64
int width, int height, GfxImageColorMap *colorMap,
65
int *maskColors, GBool inlineImg);
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?