~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/xpdflib/imageoutputdev.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2005-02-24 22:09:16 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050224220916-9vxiiqjz066r5489
Tags: 6.0pre23-2
debian/control: Ipe should depend on exact version of libipe.
Closes: #296771.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- C++ -*-
2
 
//========================================================================
3
 
//
4
 
// ImageOutputDev.h
5
 
//
6
 
// Copyright 1998-2002 Glyph & Cog, LLC
7
 
//
8
 
//========================================================================
9
 
 
10
 
#ifndef IMAGEOUTPUTDEV_H
11
 
#define IMAGEOUTPUTDEV_H
12
 
 
13
 
#include "aconf.h"
14
 
 
15
 
#ifdef USE_GCC_PRAGMAS
16
 
#pragma interface
17
 
#endif
18
 
 
19
 
#include <stdio.h>
20
 
#include "ocfile.h"
21
 
#include "gtypes.h"
22
 
#include "outputdev.h"
23
 
 
24
 
class GfxState;
25
 
 
26
 
//------------------------------------------------------------------------
27
 
// ImageOutputDev
28
 
//------------------------------------------------------------------------
29
 
 
30
 
class ImageOutputDev: public OutputDev {
31
 
public:
32
 
 
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);
38
 
 
39
 
  // Destructor.
40
 
  virtual ~ImageOutputDev();
41
 
 
42
 
  // Check if file was successfully created.
43
 
  virtual GBool isOk() { return ok; }
44
 
 
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; }
48
 
 
49
 
  // Does this device need non-text content?
50
 
  virtual GBool needNonText() { return gFalse; }
51
 
 
52
 
  //---- get info about output device
53
 
 
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; }
57
 
 
58
 
  // Does this device use drawChar() or drawString()?
59
 
  virtual GBool useDrawChar() { return gFalse; }
60
 
 
61
 
  //----- image drawing
62
 
  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
63
 
                             int width, int height, GBool invert,
64
 
                             GBool inlineImg);
65
 
  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
66
 
                         int width, int height, GfxImageColorMap *colorMap,
67
 
                         int *maskColors, GBool inlineImg);
68
 
 
69
 
private:
70
 
 
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?
76
 
};
77
 
 
78
 
#endif