3
developped by BBR Inc. 2006-2007
5
This file is based on Gfx.h
6
Gfx.h copyright notice is follows
7
and is licensed under GPL.
9
//========================================================================
13
// Copyright 1996-2003 Glyph & Cog, LLC
15
//========================================================================
20
#ifdef USE_GCC_PRAGMAS
24
#include "goo/gtypes.h"
27
#include "P2POutputStream.h"
28
#include "P2PResources.h"
30
#include "P2PMatrix.h"
40
//------------------------------------------------------------------------
42
//------------------------------------------------------------------------
48
P2PGfx(XRef *xrefA, P2POutputStream *strA, P2PFontResource *fontResourceA,
49
P2PResources *resourcesA);
52
// Interpret a stream or array of streams.
53
void outputContents(Object *obj, P2PResourceMap *mappingTableA,
54
Dict *orgResourceA, P2PMatrix *matA);
60
TchkType tchk[maxArgs];
61
void (P2PGfx::*func)(Object args[], int numArgs);
81
void copy(P2PGfxState *src) {
85
P2PGfxState(P2PGfxState *src, P2PGfxState *nextA) {
90
P2PFontDict *getFont() { return font; }
92
void setFont(P2PFontDict *fontA) {
93
if (fontA != 0) font = fontA;
97
next = new P2PGfxState(this,next);
103
P2PGfxState *oldNext = next;
104
next = oldNext->next;
112
P2PFontDict *font; // current font
116
XRef *xref; // the xref table for this PDF file
117
P2POutputStream *str; // output stream
118
P2PResourceMap *mappingTable; // resouce name mapping table
119
P2PFontResource *fontResource; // font resource
121
Dict *orgCSResource; // Color Space resource dictionay of original page
122
P2PResources *resources;
125
Parser *parser; // parser for page content stream(s)
127
static P2POperator opTab[]; // table of operators
130
void execOp(Object *cmd, Object args[], int numArgs);
131
P2POperator *findOp(char *name);
132
GBool checkArg(Object *arg, TchkType type);
134
void outputOp(const char *name, Object args[], int numArgs);
135
void opSetStrokeColorSpace(Object args[], int numArgs);
136
void opXObject(Object args[], int numArgs);
137
void opSetStrokeColorN(Object args[], int numArgs);
138
void opSetFont(Object args[], int numArgs);
139
void opSetFillColorSpace(Object args[], int numArgs);
140
void opSetExtGState(Object args[], int numArgs);
141
void opSetFillColorN(Object args[], int numArgs);
142
void opShFill(Object args[], int numArgs);
143
void opMoveSetShowText(Object args[], int numArgs);
144
void opMoveShowText(Object args[], int numArgs);
145
void opShowSpaceText(Object args[], int numArgs);
146
void opShowText(Object args[], int numArgs);
147
void opSave(Object args[], int numArgs);
148
void opRestore(Object args[], int numArgs);
149
void opBeginImage(Object args[], int numArgs);
150
void doImage(Stream *istr);