source: trunk/poppler/mypoppler/poppler/PreScanOutputDev.h @ 250

Last change on this file since 250 was 250, checked in by Eugene Romanenko, 13 years ago

PDF plugin: poppler library updated to version 0.8.3

File size: 3.8 KB
Line 
1//========================================================================
2//
3// PreScanOutputDev.h
4//
5// Copyright 2005 Glyph & Cog, LLC
6//
7//========================================================================
8
9#ifndef PRESCANOUTPUTDEV_H
10#define PRESCANOUTPUTDEV_H
11
12#ifdef USE_GCC_PRAGMAS
13#pragma interface
14#endif
15
16#include "gtypes.h"
17#include "GfxState.h"
18#include "OutputDev.h"
19
20//------------------------------------------------------------------------
21// PreScanOutputDev
22//------------------------------------------------------------------------
23
24class PreScanOutputDev: public OutputDev {
25public:
26
27  // Constructor.
28  PreScanOutputDev();
29
30  // Destructor.
31  virtual ~PreScanOutputDev();
32
33  //----- get info about output device
34
35  // Does this device use upside-down coordinates?
36  // (Upside-down means (0,0) is the top left corner of the page.)
37  virtual GBool upsideDown() { return gTrue; }
38
39  // Does this device use drawChar() or drawString()?
40  virtual GBool useDrawChar() { return gTrue; }
41
42  // Does this device use beginType3Char/endType3Char?  Otherwise,
43  // text in Type 3 fonts will be drawn with drawChar/drawString.
44  virtual GBool interpretType3Chars() { return gTrue; }
45
46  //----- initialization and control
47
48  // Start a page.
49  virtual void startPage(int pageNum, GfxState *state);
50
51  // End a page.
52  virtual void endPage();
53
54  //----- path painting
55  virtual void stroke(GfxState *state);
56  virtual void fill(GfxState *state);
57  virtual void eoFill(GfxState *state);
58
59  //----- path clipping
60  virtual void clip(GfxState *state);
61  virtual void eoClip(GfxState *state);
62
63  //----- text drawing
64  virtual void beginStringOp(GfxState *state);
65  virtual void endStringOp(GfxState *state);
66  virtual GBool beginType3Char(GfxState *state, double x, double y,
67                               double dx, double dy,
68                               CharCode code, Unicode *u, int uLen);
69  virtual void endType3Char(GfxState *state);
70
71  //----- image drawing
72  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
73                             int width, int height, GBool invert,
74                             GBool inlineImg);
75  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
76                         int width, int height, GfxImageColorMap *colorMap,
77                         int *maskColors, GBool inlineImg);
78  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
79                               int width, int height,
80                               GfxImageColorMap *colorMap,
81                               Stream *maskStr, int maskWidth, int maskHeight,
82                               GBool maskInvert);
83  virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
84                                   int width, int height,
85                                   GfxImageColorMap *colorMap,
86                                   Stream *maskStr,
87                                   int maskWidth, int maskHeight,
88                                   GfxImageColorMap *maskColorMap);
89
90  //----- transparency groups and soft masks
91  virtual void beginTransparencyGroup(GfxState *state, double *bbox,
92                                      GfxColorSpace *blendingColorSpace,
93                                      GBool isolated, GBool knockout,
94                                      GBool forSoftMask);
95
96  //----- special access
97
98  // Returns true if the operations performed since the last call to
99  // clearStats() are all monochrome (black or white).
100  GBool isMonochrome() { return mono; }
101
102  // Returns true if the operations performed since the last call to
103  // clearStats() are all gray.
104  GBool isGray() { return gray; }
105
106  // Returns true if the operations performed since the last call to
107  // clearStats() included any transparency.
108  GBool usesTransparency() { return transparency; }
109
110  // Returns true if the operations performed since the last call to
111  // clearStats() are all rasterizable by GDI calls in GDIOutputDev.
112  GBool isAllGDI() { return gdi; }
113
114  // Clear the stats used by the above functions.
115  void clearStats();
116
117private:
118
119  void check(GfxColorSpace *colorSpace, GfxColor *color,
120             double opacity, GfxBlendMode blendMode);
121
122  GBool mono;
123  GBool gray;
124  GBool transparency;
125  GBool gdi;
126};
127
128#endif
Note: See TracBrowser for help on using the repository browser.