moved from ../xpdf/
[swftools.git] / lib / pdf / InfoOutputDev.h
1 #ifndef __infooutputdev_h__
2 #define __infooutputdev_h__
3
4 #include "GfxFont.h"
5 #include "OutputDev.h"
6 #include "GHash.h"
7
8 struct FontInfo
9 {
10     GfxFont*font;
11     double max_size;
12 };
13
14 class InfoOutputDev: public OutputDev 
15 {
16   GHash* id2font;
17   FontInfo* currentfont;
18   public:
19   int x1,y1,x2,y2;
20   int num_links;
21   int num_images;
22   int num_fonts;
23
24   InfoOutputDev();
25   virtual ~InfoOutputDev();
26   virtual GBool upsideDown();
27   virtual GBool useDrawChar();
28   virtual GBool interpretType3Chars();
29   virtual void startPage(int pageNum, GfxState *state, double crop_x1, double crop_y1, double crop_x2, double crop_y2);
30   virtual void drawLink(Link *link, Catalog *catalog);
31   virtual double getMaximumFontSize(char*id);
32   virtual void updateFont(GfxState *state);
33   virtual void drawChar(GfxState *state, double x, double y,
34                         double dx, double dy,
35                         double originX, double originY,
36                         CharCode code, int nBytes, Unicode *u, int uLen);
37   virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
38                              int width, int height, GBool invert,
39                              GBool inlineImg);
40   virtual void drawImage(GfxState *state, Object *ref, Stream *str,
41                          int width, int height, GfxImageColorMap *colorMap,
42                          int *maskColors, GBool inlineImg);
43 };
44
45 #endif //__infooutputdev_h__