2 A special output device which collects information about a PDF file,
3 like fonts, Type3 glyphs and so on.
5 This file is part of swftools.
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 */
21 #ifndef __infooutputdev_h__
22 #define __infooutputdev_h__
25 #include "OutputDev.h"
26 #include "SplashFont.h"
27 #include "SplashOutputDev.h"
28 #include "SplashPath.h"
29 #include "SplashFontFile.h"
51 SplashFont*splash_font;
55 extern char*getFontID(GfxFont*font);
57 class InfoOutputDev: public OutputDev
60 FontInfo* currentfont;
61 GlyphInfo* currentglyph;
62 SplashOutputDev*splash;
69 InfoOutputDev(XRef*xref);
70 virtual ~InfoOutputDev();
71 virtual GBool useTilingPatternFill();
72 virtual GBool upsideDown();
73 virtual GBool useDrawChar();
74 virtual GBool interpretType3Chars();
75 virtual void startPage(int pageNum, GfxState *state, double crop_x1, double crop_y1, double crop_x2, double crop_y2);
76 virtual void endPage();
77 virtual void drawLink(Link *link, Catalog *catalog);
78 virtual double getMaximumFontSize(char*id);
79 virtual void updateFont(GfxState *state);
81 virtual GBool beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen);
82 virtual void type3D0(GfxState *state, double wx, double wy);
83 virtual void type3D1(GfxState *state, double wx, double wy, double llx, double lly, double urx, double ury);
84 virtual void endType3Char(GfxState *state);
86 virtual void drawChar(GfxState *state, double x, double y,
88 double originX, double originY,
89 CharCode code, int nBytes, Unicode *u, int uLen);
90 virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
91 int width, int height, GBool invert,
93 virtual void drawImage(GfxState *state, Object *ref, Stream *str,
94 int width, int height, GfxImageColorMap *colorMap,
95 int *maskColors, GBool inlineImg);
96 virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
97 int width, int height,
98 GfxImageColorMap *colorMap,
100 int maskWidth, int maskHeight,
102 virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
103 int width, int height,
104 GfxImageColorMap *colorMap,
106 int maskWidth, int maskHeight,
107 GfxImageColorMap *maskColorMap);
108 virtual FontInfo* getFont(char*id);
111 #endif //__infooutputdev_h__