~ubuntu-branches/ubuntu/saucy/emscripten/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/poppler/poppler/ArthurOutputDev.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//========================================================================
 
2
//
 
3
// ArthurOutputDev.h
 
4
//
 
5
// Copyright 2003 Glyph & Cog, LLC
 
6
//
 
7
//========================================================================
 
8
 
 
9
//========================================================================
 
10
//
 
11
// Modified under the Poppler project - http://poppler.freedesktop.org
 
12
//
 
13
// All changes made under the Poppler project to this file are licensed
 
14
// under GPL version 2 or later
 
15
//
 
16
// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
 
17
// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
 
18
// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
 
19
// Copyright (C) 2010, 2010 Pino Toscano <pino@kde.org>
 
20
//
 
21
// To see a description of the changes please see the Changelog file that
 
22
// came with your tarball or type make ChangeLog if you are building from git
 
23
//
 
24
//========================================================================
 
25
 
 
26
#ifndef ARTHUROUTPUTDEV_H
 
27
#define ARTHUROUTPUTDEV_H
 
28
 
 
29
#ifdef USE_GCC_PRAGMAS
 
30
#pragma interface
 
31
#endif
 
32
 
 
33
#include "goo/gtypes.h"
 
34
#include "OutputDev.h"
 
35
#include "GfxState.h"
 
36
 
 
37
#include <QtGui/QPainter>
 
38
 
 
39
class GfxState;
 
40
class GfxPath;
 
41
class Gfx8BitFont;
 
42
struct GfxRGB;
 
43
 
 
44
class SplashFont;
 
45
class SplashFontEngine;
 
46
struct SplashGlyphBitmap;
 
47
 
 
48
//------------------------------------------------------------------------
 
49
// ArthurOutputDev - Qt 4 QPainter renderer
 
50
//------------------------------------------------------------------------
 
51
 
 
52
class ArthurOutputDev: public OutputDev {
 
53
public:
 
54
 
 
55
  // Constructor.
 
56
  ArthurOutputDev(QPainter *painter );
 
57
 
 
58
  // Destructor.
 
59
  virtual ~ArthurOutputDev();
 
60
 
 
61
  //----- get info about output device
 
62
 
 
63
  // Does this device use upside-down coordinates?
 
64
  // (Upside-down means (0,0) is the top left corner of the page.)
 
65
  virtual GBool upsideDown() { return gTrue; }
 
66
 
 
67
  // Does this device use drawChar() or drawString()?
 
68
  virtual GBool useDrawChar() { return gTrue; }
 
69
 
 
70
  // Does this device use beginType3Char/endType3Char?  Otherwise,
 
71
  // text in Type 3 fonts will be drawn with drawChar/drawString.
 
72
  virtual GBool interpretType3Chars() { return gTrue; }
 
73
 
 
74
  //----- initialization and control
 
75
 
 
76
  // Start a page.
 
77
  virtual void startPage(int pageNum, GfxState *state);
 
78
 
 
79
  // End a page.
 
80
  virtual void endPage();
 
81
 
 
82
  //----- link borders
 
83
  virtual void drawLink(Link *link, Catalog *catalog);
 
84
 
 
85
  //----- save/restore graphics state
 
86
  virtual void saveState(GfxState *state);
 
87
  virtual void restoreState(GfxState *state);
 
88
 
 
89
  //----- update graphics state
 
90
  virtual void updateAll(GfxState *state);
 
91
  virtual void updateCTM(GfxState *state, double m11, double m12,
 
92
                         double m21, double m22, double m31, double m32);
 
93
  virtual void updateLineDash(GfxState *state);
 
94
  virtual void updateFlatness(GfxState *state);
 
95
  virtual void updateLineJoin(GfxState *state);
 
96
  virtual void updateLineCap(GfxState *state);
 
97
  virtual void updateMiterLimit(GfxState *state);
 
98
  virtual void updateLineWidth(GfxState *state);
 
99
  virtual void updateFillColor(GfxState *state);
 
100
  virtual void updateStrokeColor(GfxState *state);
 
101
  virtual void updateFillOpacity(GfxState *state);
 
102
  virtual void updateStrokeOpacity(GfxState *state);
 
103
 
 
104
  //----- update text state
 
105
  virtual void updateFont(GfxState *state);
 
106
 
 
107
  //----- path painting
 
108
  virtual void stroke(GfxState *state);
 
109
  virtual void fill(GfxState *state);
 
110
  virtual void eoFill(GfxState *state);
 
111
 
 
112
  //----- path clipping
 
113
  virtual void clip(GfxState *state);
 
114
  virtual void eoClip(GfxState *state);
 
115
 
 
116
  //----- text drawing
 
117
  //   virtual void drawString(GfxState *state, GooString *s);
 
118
  virtual void drawChar(GfxState *state, double x, double y,
 
119
                        double dx, double dy,
 
120
                        double originX, double originY,
 
121
                        CharCode code, int nBytes, Unicode *u, int uLen);
 
122
  virtual GBool beginType3Char(GfxState *state, double x, double y,
 
123
                               double dx, double dy,
 
124
                               CharCode code, Unicode *u, int uLen);
 
125
  virtual void endType3Char(GfxState *state);
 
126
  virtual void endTextObject(GfxState *state);
 
127
 
 
128
  //----- image drawing
 
129
  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
 
130
                             int width, int height, GBool invert,
 
131
                             GBool interpolate, GBool inlineImg);
 
132
  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
 
133
                         int width, int height, GfxImageColorMap *colorMap,
 
134
                         GBool interpolate, int *maskColors, GBool inlineImg);
 
135
 
 
136
  //----- Type 3 font operators
 
137
  virtual void type3D0(GfxState *state, double wx, double wy);
 
138
  virtual void type3D1(GfxState *state, double wx, double wy,
 
139
                       double llx, double lly, double urx, double ury);
 
140
 
 
141
  //----- special access
 
142
 
 
143
  // Called to indicate that a new PDF document has been loaded.
 
144
  void startDoc(XRef *xrefA);
 
145
 
 
146
  GBool isReverseVideo() { return gFalse; }
 
147
  
 
148
private:
 
149
  QPainter *m_painter;
 
150
  QFont m_currentFont;
 
151
  QPen m_currentPen;
 
152
  QBrush m_currentBrush;
 
153
  GBool m_needFontUpdate;               // set when the font needs to be updated
 
154
  SplashFontEngine *m_fontEngine;
 
155
  SplashFont *m_font;           // current font
 
156
  XRef *xref;                   // xref table for current document
 
157
};
 
158
 
 
159
#endif