new parameter addspacechars
[swftools.git] / lib / pdf / DummyOutputDev.h
1 /* DummyOutputDev.cc
2    Output Device which serves as "passthrough"
3    This file is part of swftools.
4    
5    Copyright (c) 2007 Matthias Kramm <kramm@quiss.org>
6
7    Swftools is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11
12    Swftools is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with swftools; if not, write to the Free Software
19    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
20
21 #ifndef __DummyOutputDev_h__
22 #define __DummyOutputDev_h__
23
24 #include "../gfxdevice.h"
25 #include "../gfxsource.h"
26 #include "../gfxtools.h"
27
28 #include "config.h"
29 #include "GFXOutputDev.h"
30 #include "InfoOutputDev.h"
31 #include "PDFDoc.h"
32 #include "CommonOutputDev.h"
33 #include "SplashOutputDev.h"
34
35 class DummyOutputDev: public OutputDev {
36 public:
37     DummyOutputDev(OutputDev*target);
38     virtual ~DummyOutputDev();
39    
40     // OutputDev:
41     virtual GBool upsideDown();
42     virtual GBool useDrawChar();
43     virtual GBool useTilingPatternFill();
44     virtual GBool useShadedFills();
45     virtual GBool useDrawForm();
46     virtual GBool interpretType3Chars();
47     virtual GBool needNonText();
48     virtual void setDefaultCTM(double *ctm);
49 /*    virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
50                                int rotate, GBool useMediaBox, GBool crop,
51                                int sliceX, int sliceY, int sliceW, int sliceH,
52                                GBool printing, Catalog *catalog,
53                                GBool (*abortCheckCbk)(void *data) = NULL,
54                                void *abortCheckCbkData = NULL);*/
55
56     virtual void startPage(int pageNum, GfxState *state, double x1,double y1,double x2,double y2);
57     virtual void endPage();
58
59     virtual void saveState(GfxState *state);
60     virtual void restoreState(GfxState *state);
61
62     virtual void updateAll(GfxState *state);
63     virtual void updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32);
64     virtual void updateLineDash(GfxState *state);
65     virtual void updateFlatness(GfxState *state);
66     virtual void updateLineJoin(GfxState *state);
67     virtual void updateLineCap(GfxState *state);
68     virtual void updateMiterLimit(GfxState *state);
69     virtual void updateLineWidth(GfxState *state);
70     virtual void updateStrokeAdjust(GfxState *state);
71     virtual void updateFillColorSpace(GfxState *state);
72     virtual void updateStrokeColorSpace(GfxState *state);
73     virtual void updateFillColor(GfxState *state);
74     virtual void updateStrokeColor(GfxState *state);
75     virtual void updateBlendMode(GfxState *state);
76     virtual void updateFillOpacity(GfxState *state);
77     virtual void updateStrokeOpacity(GfxState *state);
78     virtual void updateFillOverprint(GfxState *state);
79     virtual void updateStrokeOverprint(GfxState *state);
80     virtual void updateTransfer(GfxState *state);
81     virtual void updateFont(GfxState *state);
82     virtual void updateTextMat(GfxState *state);
83     virtual void updateCharSpace(GfxState *state);
84     virtual void updateRender(GfxState *state);
85     virtual void updateRise(GfxState *state);
86     virtual void updateWordSpace(GfxState *state);
87     virtual void updateHorizScaling(GfxState *state);
88     virtual void updateTextPos(GfxState *state);
89     virtual void updateTextShift(GfxState *state, double shift);
90
91     virtual void stroke(GfxState *state);
92     virtual void fill(GfxState *state);
93     virtual void eoFill(GfxState *state);
94 #if (xpdfMajorVersion < 3) || (xpdfMinorVersion < 2) || (xpdfUpdateVersion < 7)
95     virtual void tilingPatternFill(GfxState *state, Object *str,
96                                int paintType, Dict *resDict,
97                                double *mat, double *bbox,
98                                int x0, int y0, int x1, int y1,
99                                double xStep, double yStep);
100 #else
101     virtual void tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
102                                int paintType, Dict *resDict,
103                                double *mat, double *bbox,
104                                int x0, int y0, int x1, int y1,
105                                double xStep, double yStep);
106 #endif
107
108     virtual GBool functionShadedFill(GfxState *state,
109                                      GfxFunctionShading *shading);
110     virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading);
111     virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading);
112
113     virtual void clip(GfxState *state);
114     virtual void eoClip(GfxState *state);
115     virtual void clipToStrokePath(GfxState *state);
116
117     virtual void beginStringOp(GfxState *state);
118     virtual void endStringOp(GfxState *state);
119     virtual void beginString(GfxState *state, GString *s);
120     virtual void endString(GfxState *state);
121     virtual void drawChar(GfxState *state, double x, double y,
122                           double dx, double dy,
123                           double originX, double originY,
124                           CharCode code, int nBytes, Unicode *u, int uLen);
125     virtual void drawString(GfxState *state, GString *s);
126     virtual GBool beginType3Char(GfxState *state, double x, double y,
127                                  double dx, double dy,
128                                  CharCode code, Unicode *u, int uLen);
129     virtual void endType3Char(GfxState *state);
130     virtual void endTextObject(GfxState *state);
131
132     virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
133                                int width, int height, GBool invert,
134                                GBool inlineImg);
135     virtual void drawImage(GfxState *state, Object *ref, Stream *str,
136                            int width, int height, GfxImageColorMap *colorMap,
137                            int *maskColors, GBool inlineImg);
138     virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
139                                  int width, int height,
140                                  GfxImageColorMap *colorMap,
141                                  Stream *maskStr, int maskWidth, int maskHeight,
142                                  GBool maskInvert);
143     virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
144                                      int width, int height,
145                                      GfxImageColorMap *colorMap,
146                                      Stream *maskStr,
147                                      int maskWidth, int maskHeight,
148                                      GfxImageColorMap *maskColorMap);
149
150     virtual void type3D0(GfxState *state, double wx, double wy);
151     virtual void type3D1(GfxState *state, double wx, double wy, double llx, double lly, double urx, double ury);
152
153     virtual void drawForm(Ref id);
154
155     virtual void beginTransparencyGroup(GfxState *state, double *bbox,
156                                         GfxColorSpace *blendingColorSpace,
157                                         GBool isolated, GBool knockout,
158                                         GBool forSoftMask);
159     virtual void endTransparencyGroup(GfxState *state);
160     virtual void paintTransparencyGroup(GfxState *state, double *bbox);
161     virtual void setSoftMask(GfxState *state, double *bbox, GBool alpha, Function *transferFunc, GfxColor *backdropColor);
162     virtual void clearSoftMask(GfxState *state);
163
164     virtual void processLink(Link *link, Catalog *catalog);
165     
166     OutputDev*rgbdev;
167 private:
168 };
169
170 #endif