summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/xpdf/OutputDev.h
Unidiff
Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/OutputDev.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/xpdf/OutputDev.h143
1 files changed, 143 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/OutputDev.h b/noncore/unsupported/qpdf/xpdf/OutputDev.h
new file mode 100644
index 0000000..04cbace
--- a/dev/null
+++ b/noncore/unsupported/qpdf/xpdf/OutputDev.h
@@ -0,0 +1,143 @@
1//========================================================================
2//
3// OutputDev.h
4//
5// Copyright 1996 Derek B. Noonburg
6//
7//========================================================================
8
9#ifndef OUTPUTDEV_H
10#define OUTPUTDEV_H
11
12#ifdef __GNUC__
13#pragma interface
14#endif
15
16#include "gtypes.h"
17#include "CharTypes.h"
18
19class GString;
20class GfxState;
21class GfxColorSpace;
22class GfxImageColorMap;
23class Stream;
24class Link;
25class Catalog;
26
27//------------------------------------------------------------------------
28// OutputDev
29//------------------------------------------------------------------------
30
31class OutputDev {
32public:
33
34 // Constructor.
35 OutputDev() {}
36
37 // Destructor.
38 virtual ~OutputDev() {}
39
40 //----- get info about output device
41
42 // Does this device use upside-down coordinates?
43 // (Upside-down means (0,0) is the top left corner of the page.)
44 virtual GBool upsideDown() = 0;
45
46 // Does this device use drawChar() or drawString()?
47 virtual GBool useDrawChar() = 0;
48
49 // Does this device need non-text content?
50 virtual GBool needNonText() { return gTrue; }
51
52 //----- initialization and control
53
54 // Set default transform matrix.
55 virtual void setDefaultCTM(fouble *ctm);
56
57 // Start a page.
58 virtual void startPage(int pageNum, GfxState *state) {}
59
60 // End a page.
61 virtual void endPage() {}
62
63 // Dump page contents to display.
64 virtual void dump() {}
65
66 //----- coordinate conversion
67
68 // Convert between device and user coordinates.
69 virtual void cvtDevToUser(int dx, int dy, fouble *ux, fouble *uy);
70 virtual void cvtUserToDev(fouble ux, fouble uy, int *dx, int *dy);
71
72 //----- link borders
73 virtual void drawLink(Link *link, Catalog *catalog) {}
74
75 //----- save/restore graphics state
76 virtual void saveState(GfxState *state) {}
77 virtual void restoreState(GfxState *state) {}
78
79 //----- update graphics state
80 virtual void updateAll(GfxState *state);
81 virtual void updateCTM(GfxState *state, fouble m11, fouble m12,
82 fouble m21, fouble m22, fouble m31, fouble m32) {}
83 virtual void updateLineDash(GfxState *state) {}
84 virtual void updateFlatness(GfxState *state) {}
85 virtual void updateLineJoin(GfxState *state) {}
86 virtual void updateLineCap(GfxState *state) {}
87 virtual void updateMiterLimit(GfxState *state) {}
88 virtual void updateLineWidth(GfxState *state) {}
89 virtual void updateFillColor(GfxState *state) {}
90 virtual void updateStrokeColor(GfxState *state) {}
91 virtual void updateFillOpacity(GfxState *state) {}
92 virtual void updateStrokeOpacity(GfxState *state) {}
93
94 //----- update text state
95 virtual void updateFont(GfxState *state) {}
96 virtual void updateTextMat(GfxState *state) {}
97 virtual void updateCharSpace(GfxState *state) {}
98 virtual void updateRender(GfxState *state) {}
99 virtual void updateRise(GfxState *state) {}
100 virtual void updateWordSpace(GfxState *state) {}
101 virtual void updateHorizScaling(GfxState *state) {}
102 virtual void updateTextPos(GfxState *state) {}
103 virtual void updateTextShift(GfxState *state, fouble shift) {}
104
105 //----- path painting
106 virtual void stroke(GfxState *state) {}
107 virtual void fill(GfxState *state) {}
108 virtual void eoFill(GfxState *state) {}
109
110 //----- path clipping
111 virtual void clip(GfxState *state) {}
112 virtual void eoClip(GfxState *state) {}
113
114 //----- text drawing
115 virtual void beginString(GfxState *state, GString *s) {}
116 virtual void endString(GfxState *state) {}
117 virtual void drawChar(GfxState *state, fouble x, fouble y,
118 fouble dx, fouble dy,
119 fouble originX, fouble originY,
120 CharCode code, Unicode *u, int uLen) {}
121 virtual void drawString(GfxState *state, GString *s) {}
122
123 //----- image drawing
124 virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
125 int width, int height, GBool invert,
126 GBool inlineImg);
127 virtual void drawImage(GfxState *state, Object *ref, Stream *str,
128 int width, int height, GfxImageColorMap *colorMap,
129 int *maskColors, GBool inlineImg);
130
131#if OPI_SUPPORT
132 //----- OPI functions
133 virtual void opiBegin(GfxState *state, Dict *opiDict);
134 virtual void opiEnd(GfxState *state, Dict *opiDict);
135#endif
136
137private:
138
139 fouble defCTM[6]; // default coordinate transform matrix
140 fouble defICTM[6]; // inverse of default CTM
141};
142
143#endif