3 Output Device which serves as "passthrough"
5 Copyright (c) 2007 Matthias Kramm <kramm@quiss.org>
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.
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.
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 */
25 #include "DummyOutputDev.h"
26 #include "GFXOutputDev.h"
27 #include "SplashBitmap.h"
28 #include "SplashPattern.h"
32 DummyOutputDev::DummyOutputDev(OutputDev*target)
34 this->rgbdev = target;
36 DummyOutputDev::~DummyOutputDev()
39 delete this->rgbdev;this->rgbdev= 0;
42 void DummyOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, double crop_y1, double crop_x2, double crop_y2)
44 rgbdev->startPage(pageNum, state, crop_x1, crop_y1, crop_x2, crop_y2);
47 void DummyOutputDev::endPage()
52 GBool DummyOutputDev::upsideDown()
54 return rgbdev->upsideDown();
57 GBool DummyOutputDev::useDrawChar()
59 return rgbdev->useDrawChar();
62 GBool DummyOutputDev::useTilingPatternFill()
64 return rgbdev->useTilingPatternFill();
67 GBool DummyOutputDev::useShadedFills()
69 return rgbdev->useShadedFills();
72 GBool DummyOutputDev::useDrawForm()
74 return rgbdev->useDrawForm();
77 GBool DummyOutputDev::interpretType3Chars()
79 return rgbdev->interpretType3Chars();
82 GBool DummyOutputDev::needNonText()
84 return rgbdev->needNonText();
86 void DummyOutputDev::setDefaultCTM(double *ctm)
88 rgbdev->setDefaultCTM(ctm);
90 void DummyOutputDev::saveState(GfxState *state)
92 rgbdev->saveState(state);
94 void DummyOutputDev::restoreState(GfxState *state)
96 rgbdev->restoreState(state);
98 void DummyOutputDev::updateAll(GfxState *state)
100 rgbdev->updateAll(state);
102 void DummyOutputDev::updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32)
104 rgbdev->updateCTM(state,m11,m12,m21,m22,m31,m32);
106 void DummyOutputDev::updateLineDash(GfxState *state)
108 rgbdev->updateLineDash(state);
110 void DummyOutputDev::updateFlatness(GfxState *state)
112 rgbdev->updateFlatness(state);
114 void DummyOutputDev::updateLineJoin(GfxState *state)
116 rgbdev->updateLineJoin(state);
118 void DummyOutputDev::updateLineCap(GfxState *state)
120 rgbdev->updateLineCap(state);
122 void DummyOutputDev::updateMiterLimit(GfxState *state)
124 rgbdev->updateMiterLimit(state);
126 void DummyOutputDev::updateLineWidth(GfxState *state)
128 rgbdev->updateLineWidth(state);
130 void DummyOutputDev::updateStrokeAdjust(GfxState *state)
132 rgbdev->updateStrokeAdjust(state);
134 void DummyOutputDev::updateFillColorSpace(GfxState *state)
136 rgbdev->updateFillColorSpace(state);
138 void DummyOutputDev::updateStrokeColorSpace(GfxState *state)
140 rgbdev->updateStrokeColorSpace(state);
142 void DummyOutputDev::updateFillColor(GfxState *state)
144 rgbdev->updateFillColor(state);
146 void DummyOutputDev::updateStrokeColor(GfxState *state)
148 rgbdev->updateStrokeColor(state);
150 void DummyOutputDev::updateBlendMode(GfxState *state)
152 rgbdev->updateBlendMode(state);
154 void DummyOutputDev::updateFillOpacity(GfxState *state)
156 rgbdev->updateFillOpacity(state);
158 void DummyOutputDev::updateStrokeOpacity(GfxState *state)
160 rgbdev->updateStrokeOpacity(state);
162 void DummyOutputDev::updateFillOverprint(GfxState *state)
164 rgbdev->updateFillOverprint(state);
166 void DummyOutputDev::updateStrokeOverprint(GfxState *state)
168 rgbdev->updateStrokeOverprint(state);
170 void DummyOutputDev::updateTransfer(GfxState *state)
172 rgbdev->updateTransfer(state);
174 void DummyOutputDev::updateFont(GfxState *state)
176 rgbdev->updateFont(state);
178 void DummyOutputDev::updateTextMat(GfxState *state)
180 rgbdev->updateTextMat(state);
182 void DummyOutputDev::updateCharSpace(GfxState *state)
184 rgbdev->updateCharSpace(state);
186 void DummyOutputDev::updateRender(GfxState *state)
188 rgbdev->updateRender(state);
190 void DummyOutputDev::updateRise(GfxState *state)
192 rgbdev->updateRise(state);
194 void DummyOutputDev::updateWordSpace(GfxState *state)
196 rgbdev->updateWordSpace(state);
198 void DummyOutputDev::updateHorizScaling(GfxState *state)
200 rgbdev->updateHorizScaling(state);
202 void DummyOutputDev::updateTextPos(GfxState *state)
204 rgbdev->updateTextPos(state);
206 void DummyOutputDev::updateTextShift(GfxState *state, double shift)
208 rgbdev->updateTextShift(state, shift);
210 void DummyOutputDev::stroke(GfxState *state)
212 rgbdev->stroke(state);
214 void DummyOutputDev::fill(GfxState *state)
218 void DummyOutputDev::eoFill(GfxState *state)
220 rgbdev->eoFill(state);
222 #if (xpdfMajorVersion < 3) || (xpdfMinorVersion < 2) || (xpdfUpdateVersion < 7)
223 void DummyOutputDev::tilingPatternFill(GfxState *state, Object *str,
224 int paintType, Dict *resDict,
225 double *mat, double *bbox,
226 int x0, int y0, int x1, int y1,
227 double xStep, double yStep)
229 rgbdev->tilingPatternFill(state, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
232 void DummyOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
233 int paintType, Dict *resDict,
234 double *mat, double *bbox,
235 int x0, int y0, int x1, int y1,
236 double xStep, double yStep)
238 rgbdev->tilingPatternFill(state, gfx, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
242 GBool DummyOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading)
244 return rgbdev->functionShadedFill(state, shading);
246 GBool DummyOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading)
248 return rgbdev->axialShadedFill(state, shading);
250 GBool DummyOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading)
252 return rgbdev->radialShadedFill(state, shading);
255 void DummyOutputDev::clip(GfxState *state)
259 void DummyOutputDev::eoClip(GfxState *state)
261 rgbdev->eoClip(state);
263 void DummyOutputDev::clipToStrokePath(GfxState *state)
265 rgbdev->clipToStrokePath(state);
268 void DummyOutputDev::beginStringOp(GfxState *state)
270 rgbdev->beginStringOp(state);
272 void DummyOutputDev::endStringOp(GfxState *state)
274 rgbdev->endStringOp(state);
276 void DummyOutputDev::beginString(GfxState *state, GString *s)
278 rgbdev->beginString(state, s);
280 void DummyOutputDev::endString(GfxState *state)
282 rgbdev->endString(state);
284 void DummyOutputDev::drawChar(GfxState *state, double x, double y,
285 double dx, double dy,
286 double originX, double originY,
287 CharCode code, int nBytes, Unicode *u, int uLen)
289 rgbdev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
291 void DummyOutputDev::drawString(GfxState *state, GString *s)
293 rgbdev->drawString(state, s);
295 void DummyOutputDev::endTextObject(GfxState *state)
297 rgbdev->endTextObject(state);
299 GBool DummyOutputDev::beginType3Char(GfxState *state, double x, double y,
300 double dx, double dy,
301 CharCode code, Unicode *u, int uLen)
303 return rgbdev->beginType3Char(state, x, y, dx, dy, code, u, uLen);
305 void DummyOutputDev::type3D0(GfxState *state, double wx, double wy)
307 rgbdev->type3D0(state, wx, wy);
309 void DummyOutputDev::type3D1(GfxState *state, double wx, double wy, double llx, double lly, double urx, double ury)
311 rgbdev->type3D1(state, wx, wy, llx, lly, urx, ury);
313 void DummyOutputDev::endType3Char(GfxState *state)
315 rgbdev->endType3Char(state);
317 void DummyOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
318 int width, int height, GBool invert,
321 rgbdev->drawImageMask(state, ref, str, width, height, invert, inlineImg);
323 void DummyOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
324 int width, int height, GfxImageColorMap *colorMap,
325 int *maskColors, GBool inlineImg)
327 rgbdev->drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg);
329 void DummyOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
330 int width, int height,
331 GfxImageColorMap *colorMap,
332 Stream *maskStr, int maskWidth, int maskHeight,
335 rgbdev->drawMaskedImage(state, ref, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert);
337 void DummyOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
338 int width, int height,
339 GfxImageColorMap *colorMap,
341 int maskWidth, int maskHeight,
342 GfxImageColorMap *maskColorMap)
344 rgbdev->drawSoftMaskedImage(state, ref, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap);
346 void DummyOutputDev::drawForm(Ref id)
348 rgbdev->drawForm(id);
351 void DummyOutputDev::processLink(Link *link, Catalog *catalog)
355 void DummyOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
356 GfxColorSpace *blendingColorSpace,
357 GBool isolated, GBool knockout,
360 rgbdev->beginTransparencyGroup(state, bbox, blendingColorSpace, isolated, knockout, forSoftMask);
362 void DummyOutputDev::endTransparencyGroup(GfxState *state)
364 rgbdev->endTransparencyGroup(state);
366 void DummyOutputDev::paintTransparencyGroup(GfxState *state, double *bbox)
368 rgbdev->paintTransparencyGroup(state,bbox);
370 void DummyOutputDev::setSoftMask(GfxState *state, double *bbox, GBool alpha, Function *transferFunc, GfxColor *backdropColor)
372 rgbdev->setSoftMask(state, bbox, alpha, transferFunc, backdropColor);
374 void DummyOutputDev::clearSoftMask(GfxState *state)
376 rgbdev->clearSoftMask(state);