00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef OUTPUTDEV_H
00010 #define OUTPUTDEV_H
00011
00012 #include <aconf.h>
00013
00014 #ifdef USE_GCC_PRAGMAS
00015 #pragma interface
00016 #endif
00017
00018 #include "gtypes.h"
00019 #include "CharTypes.h"
00020
00021 class GString;
00022 class GfxState;
00023 class GfxColorSpace;
00024 class GfxImageColorMap;
00025 class Stream;
00026 class Link;
00027 class Catalog;
00028
00029
00030
00031
00032
00033 class OutputDev {
00034 public:
00035
00036
00037 OutputDev() {}
00038
00039
00040 virtual ~OutputDev() {}
00041
00042
00043
00044
00045
00046 virtual GBool upsideDown() = 0;
00047
00048
00049 virtual GBool useDrawChar() = 0;
00050
00051
00052
00053 virtual GBool interpretType3Chars() = 0;
00054
00055
00056 virtual GBool needNonText() { return gTrue; }
00057
00058
00059
00060
00061 virtual void setDefaultCTM(double *ctm);
00062
00063
00064 virtual void startPage(int pageNum, GfxState *state) {}
00065
00066
00067 virtual void endPage() {}
00068
00069
00070 virtual void dump() {}
00071
00072
00073
00074
00075 virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy);
00076 virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy);
00077
00078
00079 virtual void drawLink(Link *link, Catalog *catalog) {}
00080
00081
00082 virtual void saveState(GfxState *state) {}
00083 virtual void restoreState(GfxState *state) {}
00084
00085
00086 virtual void updateAll(GfxState *state);
00087 virtual void updateCTM(GfxState *state, double m11, double m12,
00088 double m21, double m22, double m31, double m32) {}
00089 virtual void updateLineDash(GfxState *state) {}
00090 virtual void updateFlatness(GfxState *state) {}
00091 virtual void updateLineJoin(GfxState *state) {}
00092 virtual void updateLineCap(GfxState *state) {}
00093 virtual void updateMiterLimit(GfxState *state) {}
00094 virtual void updateLineWidth(GfxState *state) {}
00095 virtual void updateFillColor(GfxState *state) {}
00096 virtual void updateStrokeColor(GfxState *state) {}
00097 virtual void updateFillOpacity(GfxState *state) {}
00098 virtual void updateStrokeOpacity(GfxState *state) {}
00099
00100
00101 virtual void updateFont(GfxState *state) {}
00102 virtual void updateTextMat(GfxState *state) {}
00103 virtual void updateCharSpace(GfxState *state) {}
00104 virtual void updateRender(GfxState *state) {}
00105 virtual void updateRise(GfxState *state) {}
00106 virtual void updateWordSpace(GfxState *state) {}
00107 virtual void updateHorizScaling(GfxState *state) {}
00108 virtual void updateTextPos(GfxState *state) {}
00109 virtual void updateTextShift(GfxState *state, double shift) {}
00110
00111
00112 virtual void stroke(GfxState *state) {}
00113 virtual void fill(GfxState *state) {}
00114 virtual void eoFill(GfxState *state) {}
00115
00116
00117 virtual void clip(GfxState *state) {}
00118 virtual void eoClip(GfxState *state) {}
00119
00120
00121 virtual void beginString(GfxState *state, GString *s) {}
00122 virtual void endString(GfxState *state) {}
00123 virtual void drawChar(GfxState *state, double x, double y,
00124 double dx, double dy,
00125 double originX, double originY,
00126 CharCode code, Unicode *u, int uLen) {}
00127 virtual void drawString(GfxState *state, GString *s) {}
00128 virtual GBool beginType3Char(GfxState *state, double x, double y,
00129 double dx, double dy,
00130 CharCode code, Unicode *u, int uLen);
00131 virtual void endType3Char(GfxState *state) {}
00132 virtual void endTextObject(GfxState *state) {}
00133
00134
00135 virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
00136 int width, int height, GBool invert,
00137 GBool inlineImg);
00138 virtual void drawImage(GfxState *state, Object *ref, Stream *str,
00139 int width, int height, GfxImageColorMap *colorMap,
00140 int *maskColors, GBool inlineImg);
00141
00142 #if OPI_SUPPORT
00143
00144 virtual void opiBegin(GfxState *state, Dict *opiDict);
00145 virtual void opiEnd(GfxState *state, Dict *opiDict);
00146 #endif
00147
00148
00149 virtual void type3D0(GfxState *state, double wx, double wy) {}
00150 virtual void type3D1(GfxState *state, double wx, double wy,
00151 double llx, double lly, double urx, double ury) {}
00152
00153
00154 virtual void psXObject(Stream *psStream, Stream *level1Stream) {}
00155
00156 private:
00157
00158 double defCTM[6];
00159 double defICTM[6];
00160 };
00161
00162 #endif