]> www.fi.muni.cz Git - evince.git/blob - pdf/xpdf/XOutputDev.h
kill traces of ltk, incorporate new sources
[evince.git] / pdf / xpdf / XOutputDev.h
1 //========================================================================
2 //
3 // XOutputDev.h
4 //
5 // Copyright 1996-2002 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef XOUTPUTDEV_H
10 #define XOUTPUTDEV_H
11
12 #include <aconf.h>
13
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
17
18 #include <stddef.h>
19 #include <X11/Xlib.h>
20 #include <X11/Xutil.h>
21 #include "config.h"
22 #include "Object.h"
23 #include "CharTypes.h"
24 #include "GlobalParams.h"
25 #include "OutputDev.h"
26
27 class GString;
28 class GList;
29 struct GfxRGB;
30 class GfxFont;
31 class GfxSubpath;
32 class TextPage;
33 class XOutputFontCache;
34 struct T3FontCacheTag;
35 class T3FontCache;
36 struct T3GlyphStack;
37 class XOutputDev;
38 class Link;
39 class Catalog;
40 class DisplayFontParam;
41 class UnicodeMap;
42 class CharCodeToUnicode;
43
44 #if HAVE_T1LIB_H
45 class T1FontEngine;
46 class T1FontFile;
47 class T1Font;
48 #endif
49
50 #if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
51 class FTFontEngine;
52 class FTFontFile;
53 class FTFont;
54 #endif
55
56 #if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
57 class TTFontEngine;
58 class TTFontFile;
59 class TTFont;
60 #endif
61
62 //------------------------------------------------------------------------
63 // Constants
64 //------------------------------------------------------------------------
65
66 #define maxRGBCube 7            // max size of RGB color cube
67
68 #define numTmpPoints 256        // number of XPoints in temporary array
69 #define numTmpSubpaths 16       // number of elements in temporary arrays
70                                 //   for fill/clip
71
72 //------------------------------------------------------------------------
73 // Misc types
74 //------------------------------------------------------------------------
75
76 struct BoundingRect {
77   short xMin, xMax;             // min/max x values
78   short yMin, yMax;             // min/max y values
79 };
80
81 //------------------------------------------------------------------------
82 // XOutputFont
83 //------------------------------------------------------------------------
84
85 class XOutputFont {
86 public:
87
88   XOutputFont(Ref *idA, double m11OrigA, double m12OrigA,
89               double m21OrigA, double m22OrigA,
90               double m11A, double m12A, double m21A, double m22A,
91               Display *displayA, XOutputDev *xOutA);
92
93   virtual ~XOutputFont();
94
95   // Does this font match the ID and transform?
96   GBool matches(Ref *idA, double m11OrigA, double m12OrigA,
97                 double m21OrigA, double m22OrigA)
98     { return id.num == idA->num && id.gen == idA->gen &&
99              m11Orig == m11OrigA && m12Orig == m12OrigA &&
100              m21Orig == m21OrigA && m22Orig == m22OrigA; }
101
102   // Was font created successfully?
103   virtual GBool isOk() = 0;
104
105   // Update <gc> with this font.
106   virtual void updateGC(GC gc) = 0;
107
108   // Draw character <c>/<u> at <x>,<y> (in device space).
109   virtual void drawChar(GfxState *state, Pixmap pixmap, int w, int h,
110                         GC gc, GfxRGB *rgb,
111                         double x, double y, double dx, double dy,
112                         CharCode c, Unicode *u, int uLen) = 0;
113
114   // Returns true if this XOutputFont subclass provides the
115   // getCharPath function.
116   virtual GBool hasGetCharPath() { return gFalse; }
117
118   // Add the character outline for <c>/<u> to the current path.
119   virtual void getCharPath(GfxState *state,
120                            CharCode c, Unicode *u, int ulen);
121
122 protected:
123
124   Ref id;                       // font ID
125   double m11Orig, m12Orig,      // original transform matrix
126          m21Orig, m22Orig;
127   double m11, m12, m21, m22;    // actual transform matrix (possibly
128                                 //   modified for font substitution)
129   Display *display;             // X display
130   XOutputDev *xOut;
131 };
132
133 #if HAVE_T1LIB_H
134 //------------------------------------------------------------------------
135 // XOutputT1Font
136 //------------------------------------------------------------------------
137
138 class XOutputT1Font: public XOutputFont {
139 public:
140
141   XOutputT1Font(Ref *idA, T1FontFile *fontFileA,
142                 double m11OrigA, double m12OrigA,
143                 double m21OrigA, double m22OrigA,
144                 double m11A, double m12A,
145                 double m21A, double m22A,
146                 Display *displayA, XOutputDev *xOutA);
147
148   virtual ~XOutputT1Font();
149
150   // Was font created successfully?
151   virtual GBool isOk();
152
153   // Update <gc> with this font.
154   virtual void updateGC(GC gc);
155
156   // Draw character <c>/<u> at <x>,<y>.
157   virtual void drawChar(GfxState *state, Pixmap pixmap, int w, int h,
158                         GC gc, GfxRGB *rgb,
159                         double x, double y, double dx, double dy,
160                         CharCode c, Unicode *u, int uLen);
161
162   // Returns true if this XOutputFont subclass provides the
163   // getCharPath function.
164   virtual GBool hasGetCharPath() { return gTrue; }
165
166   // Add the character outline for <c>/<u> to the current path.
167   virtual void getCharPath(GfxState *state,
168                            CharCode c, Unicode *u, int ulen);
169
170 private:
171
172   T1FontFile *fontFile;
173   T1Font *font;
174 };
175 #endif // HAVE_T1LIB_H
176
177 #if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
178 //------------------------------------------------------------------------
179 // XOutputFTFont
180 //------------------------------------------------------------------------
181
182 class XOutputFTFont: public XOutputFont {
183 public:
184
185   XOutputFTFont(Ref *idA, FTFontFile *fontFileA,
186                 double m11OrigA, double m12OrigA,
187                 double m21OrigA, double m22OrigA,
188                 double m11A, double m12A,
189                 double m21A, double m22A,
190                 Display *displayA, XOutputDev *xOutA);
191
192   virtual ~XOutputFTFont();
193
194   // Was font created successfully?
195   virtual GBool isOk();
196
197   // Update <gc> with this font.
198   virtual void updateGC(GC gc);
199
200   // Draw character <c>/<u> at <x>,<y>.
201   virtual void drawChar(GfxState *state, Pixmap pixmap, int w, int h,
202                         GC gc, GfxRGB *rgb,
203                         double x, double y, double dx, double dy,
204                         CharCode c, Unicode *u, int uLen);
205
206   // Returns true if this XOutputFont subclass provides the
207   // getCharPath function.
208   virtual GBool hasGetCharPath() { return gTrue; }
209
210   // Add the character outline for <c>/<u> to the current path.
211   virtual void getCharPath(GfxState *state,
212                            CharCode c, Unicode *u, int ulen);
213
214 private:
215
216   FTFontFile *fontFile;
217   FTFont *font;
218 };
219 #endif // FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
220
221 #if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
222 //------------------------------------------------------------------------
223 // XOutputTTFont
224 //------------------------------------------------------------------------
225
226 class XOutputTTFont: public XOutputFont {
227 public:
228
229   XOutputTTFont(Ref *idA, TTFontFile *fontFileA,
230                 double m11OrigA, double m12OrigA,
231                 double m21OrigA, double m22OrigA,
232                 double m11A, double m12A,
233                 double m21A, double m22A,
234                 Display *displayA, XOutputDev *xOutA);
235
236   virtual ~XOutputTTFont();
237
238   // Was font created successfully?
239   virtual GBool isOk();
240
241   // Update <gc> with this font.
242   virtual void updateGC(GC gc);
243
244   // Draw character <c>/<u> at <x>,<y>.
245   virtual void drawChar(GfxState *state, Pixmap pixmap, int w, int h,
246                         GC gc, GfxRGB *rgb,
247                         double x, double y, double dx, double dy,
248                         CharCode c, Unicode *u, int uLen);
249
250 private:
251
252   TTFontFile *fontFile;
253   TTFont *font;
254 };
255 #endif // !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
256
257 //------------------------------------------------------------------------
258 // XOutputServer8BitFont
259 //------------------------------------------------------------------------
260
261 class XOutputServer8BitFont: public XOutputFont {
262 public:
263
264   XOutputServer8BitFont(Ref *idA, GString *xlfdFmt,
265                         UnicodeMap *xUMapA, CharCodeToUnicode *fontUMap,
266                         double m11OrigA, double m12OrigA,
267                         double m21OrigA, double m22OrigA,
268                         double m11A, double m12A, double m21A, double m22A,
269                         Display *displayA, XOutputDev *xOutA);
270
271   virtual ~XOutputServer8BitFont();
272
273   // Was font created successfully?
274   virtual GBool isOk();
275
276   // Update <gc> with this font.
277   virtual void updateGC(GC gc);
278
279   // Draw character <c>/<u> at <x>,<y>.
280   virtual void drawChar(GfxState *state, Pixmap pixmap, int w, int h,
281                         GC gc, GfxRGB *rgb,
282                         double x, double y, double dx, double dy,
283                         CharCode c, Unicode *u, int uLen);
284
285 private:
286
287   XFontStruct *xFont;           // the X font
288   Gushort map[256];             // forward map (char code -> X font code)
289   UnicodeMap *xUMap;
290 };
291
292 //------------------------------------------------------------------------
293 // XOutputServer16BitFont
294 //------------------------------------------------------------------------
295
296 class XOutputServer16BitFont: public XOutputFont {
297 public:
298
299   XOutputServer16BitFont(Ref *idA, GString *xlfdFmt,
300                          UnicodeMap *xUMapA, CharCodeToUnicode *fontUMap,
301                          double m11OrigA, double m12OrigA,
302                          double m21OrigA, double m22OrigA,
303                          double m11A, double m12A, double m21A, double m22A,
304                          Display *displayA, XOutputDev *xOutA);
305
306   virtual ~XOutputServer16BitFont();
307
308   // Was font created successfully?
309   virtual GBool isOk();
310
311   // Update <gc> with this font.
312   virtual void updateGC(GC gc);
313
314   // Draw character <c>/<u> at <x>,<y>.
315   virtual void drawChar(GfxState *state, Pixmap pixmap, int w, int h,
316                         GC gc, GfxRGB *rgb,
317                         double x, double y, double dx, double dy,
318                         CharCode c, Unicode *u, int uLen);
319
320 private:
321
322   XFontStruct *xFont;           // the X font
323   UnicodeMap *xUMap;
324 };
325
326 //------------------------------------------------------------------------
327 // XOutputFontCache
328 //------------------------------------------------------------------------
329
330 #if HAVE_T1LIB_H
331 class XOutputT1FontFile {
332 public:
333   XOutputT1FontFile(int numA, int genA, GBool substA,
334                     T1FontFile *fontFileA, GString *tmpFileNameA)
335     { num = numA; gen = genA; subst = substA;
336       fontFile = fontFileA; tmpFileName = tmpFileNameA; }
337   ~XOutputT1FontFile();
338   int num, gen;
339   GBool subst;
340   T1FontFile *fontFile;
341   GString *tmpFileName;
342 };
343 #endif
344
345 #if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
346 class XOutputFTFontFile {
347 public:
348   XOutputFTFontFile(int numA, int genA, GBool substA,
349                     FTFontFile *fontFileA, GString *tmpFileNameA)
350     { num = numA; gen = genA; subst = substA;
351       fontFile = fontFileA; tmpFileName = tmpFileNameA; }
352   ~XOutputFTFontFile();
353   int num, gen;
354   GBool subst;
355   FTFontFile *fontFile;
356   GString *tmpFileName;
357 };
358 #endif
359
360 #if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
361 class XOutputTTFontFile {
362 public:
363   XOutputTTFontFile(int numA, int genA, GBool substA,
364                     TTFontFile *fontFileA, GString *tmpFileNameA)
365     { num = numA; gen = genA; subst = substA;
366       fontFile = fontFileA; tmpFileName = tmpFileNameA; }
367   ~XOutputTTFontFile();
368   int num, gen;
369   GBool subst;
370   TTFontFile *fontFile;
371   GString *tmpFileName;
372 };
373 #endif
374
375 class XOutputFontCache {
376 public:
377
378   // Constructor.
379   XOutputFontCache(Display *displayA, Guint depthA,
380                    XOutputDev *xOutA,
381                    FontRastControl t1libControlA,
382                    FontRastControl freetypeControlA);
383
384   // Destructor.
385   ~XOutputFontCache();
386
387   // Initialize (or re-initialize) the font cache for a new document.
388   void startDoc(int screenNum, Visual *visual,
389                 Colormap colormap, GBool trueColor,
390                 int rMul, int gMul, int bMul,
391                 int rShift, int gShift, int bShift,
392                 Gulong *colors, int numColors);
393
394   // Get a font.  This creates a new font if necessary.
395   XOutputFont *getFont(XRef *xref, GfxFont *gfxFont, double m11, double m12,
396                        double m21, double m22);
397
398 private:
399
400   void delFonts();
401   void clear();
402   XOutputFont *tryGetFont(XRef *xref, DisplayFontParam *dfp, GfxFont *gfxFont,
403                           double m11Orig, double m12Orig,
404                           double m21Orig, double m22Orig,
405                           double m11, double m12, double m21, double m22,
406                           GBool subst);
407 #if HAVE_T1LIB_H
408   XOutputFont *tryGetT1Font(XRef *xref, GfxFont *gfxFont,
409                             double m11, double m12, double m21, double m22);
410   XOutputFont *tryGetT1FontFromFile(XRef *xref, GString *fileName,
411                                     GBool deleteFile, GfxFont *gfxFont,
412                                     double m11Orig, double m12Orig,
413                                     double m21Orig, double m22Orig,
414                                     double m11, double m12,
415                                     double m21, double m22, GBool subst);
416 #endif
417 #if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
418   XOutputFont *tryGetFTFont(XRef *xref, GfxFont *gfxFont,
419                             double m11, double m12, double m21, double m22);
420   XOutputFont *tryGetFTFontFromFile(XRef *xref, GString *fileName,
421                                     GBool deleteFile, GfxFont *gfxFont,
422                                     double m11Orig, double m12Orig,
423                                     double m21Orig, double m22Orig,
424                                     double m11, double m12,
425                                     double m21, double m22, GBool subst);
426 #endif
427 #if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
428   XOutputFont *tryGetTTFont(XRef *xref, GfxFont *gfxFont,
429                             double m11, double m12, double m21, double m22);
430   XOutputFont *tryGetTTFontFromFile(XRef *xref, GString *fileName,
431                                     GBool deleteFile, GfxFont *gfxFont,
432                                     double m11Orig, double m12Orig,
433                                     double m21Orig, double m22Orig,
434                                     double m11, double m12,
435                                     double m21, double m22, GBool subst);
436 #endif
437   XOutputFont *tryGetServerFont(GString *xlfd, GString *encodingName,
438                                 GfxFont *gfxFont,
439                                 double m11Orig, double m12Orig,
440                                 double m21Orig, double m22Orig,
441                                 double m11, double m12,
442                                 double m21, double m22);
443
444   Display *display;             // X display pointer
445   XOutputDev *xOut;
446   Guint depth;                  // pixmap depth
447
448   XOutputFont *
449     fonts[xOutFontCacheSize];
450   int nFonts;
451
452 #if HAVE_T1LIB_H
453   FontRastControl t1libControl; // t1lib settings
454   T1FontEngine *t1Engine;       // Type 1 font engine
455   GList *t1FontFiles;           // list of Type 1 font files
456                                 //   [XOutputT1FontFile]
457 #endif
458
459 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
460   FontRastControl               // FreeType settings
461     freetypeControl;
462 #endif
463 #if FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
464   FTFontEngine *ftEngine;       // FreeType font engine
465   GList *ftFontFiles;           // list of FreeType font files
466                                 //   [XOutputFTFontFile]
467 #endif
468 #if !FREETYPE2 && (HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H)
469   TTFontEngine *ttEngine;       // TrueType font engine
470   GList *ttFontFiles;           // list of TrueType font files
471                                 //   [XOutputTTFontFile]
472 #endif
473 };
474
475 //------------------------------------------------------------------------
476 // XOutputState
477 //------------------------------------------------------------------------
478
479 struct XOutputState {
480   GC strokeGC;
481   GC fillGC;
482   Region clipRegion;
483   XOutputState *next;
484 };
485
486 //------------------------------------------------------------------------
487 // XOutputDev
488 //------------------------------------------------------------------------
489
490 class XOutputDev: public OutputDev {
491 public:
492
493   // Constructor.
494   XOutputDev(Display *displayA, int screenNumA,
495              Visual *visualA, Colormap colormapA,
496              GBool reverseVideoA, unsigned long paperColorA,
497              GBool installCmap, int rgbCubeSize,
498              int forceDepth = 0);
499
500   // Destructor.
501   virtual ~XOutputDev();
502
503   //---- get info about output device
504
505   // Does this device use upside-down coordinates?
506   // (Upside-down means (0,0) is the top left corner of the page.)
507   virtual GBool upsideDown() { return gTrue; }
508
509   // Does this device use drawChar() or drawString()?
510   virtual GBool useDrawChar() { return gTrue; }
511
512   // Does this device use beginType3Char/endType3Char?  Otherwise,
513   // text in Type 3 fonts will be drawn with drawChar/drawString.
514   virtual GBool interpretType3Chars() { return gTrue; }
515
516   //----- initialization and control
517
518   // Start a page.
519   virtual void startPage(int pageNum, GfxState *state);
520
521   // End a page.
522   virtual void endPage();
523
524   //----- link borders
525   virtual void drawLink(Link *link, Catalog *catalog);
526
527   //----- save/restore graphics state
528   virtual void saveState(GfxState *state);
529   virtual void restoreState(GfxState *state);
530
531   //----- update graphics state
532   virtual void updateAll(GfxState *state);
533   virtual void updateCTM(GfxState *state, double m11, double m12,
534                          double m21, double m22, double m31, double m32);
535   virtual void updateLineDash(GfxState *state);
536   virtual void updateFlatness(GfxState *state);
537   virtual void updateLineJoin(GfxState *state);
538   virtual void updateLineCap(GfxState *state);
539   virtual void updateMiterLimit(GfxState *state);
540   virtual void updateLineWidth(GfxState *state);
541   virtual void updateFillColor(GfxState *state);
542   virtual void updateStrokeColor(GfxState *state);
543
544   //----- update text state
545   virtual void updateFont(GfxState *state);
546
547   //----- path painting
548   virtual void stroke(GfxState *state);
549   virtual void fill(GfxState *state);
550   virtual void eoFill(GfxState *state);
551
552   //----- path clipping
553   virtual void clip(GfxState *state);
554   virtual void eoClip(GfxState *state);
555
556   //----- text drawing
557   virtual void beginString(GfxState *state, GString *s);
558   virtual void endString(GfxState *state);
559   virtual void drawChar(GfxState *state, double x, double y,
560                         double dx, double dy,
561                         double originX, double originY,
562                         CharCode code, Unicode *u, int uLen);
563   virtual GBool beginType3Char(GfxState *state,
564                                CharCode code, Unicode *u, int uLen);
565   virtual void endType3Char(GfxState *state);
566
567   //----- image drawing
568   virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
569                              int width, int height, GBool invert,
570                              GBool inlineImg);
571   virtual void drawImage(GfxState *state, Object *ref, Stream *str,
572                          int width, int height, GfxImageColorMap *colorMap,
573                          int *maskColors, GBool inlineImg);
574
575   //----- Type 3 font operators
576   virtual void type3D0(GfxState *state, double wx, double wy);
577   virtual void type3D1(GfxState *state, double wx, double wy,
578                        double llx, double lly, double urx, double ury);
579
580   //----- special access
581
582   // Called to indicate that a new PDF document has been loaded.
583   void startDoc(XRef *xrefA);
584
585   // Find a string.  If <top> is true, starts looking at <xMin>,<yMin>;
586   // otherwise starts looking at top of page.  If <bottom> is true,
587   // stops looking at <xMax>,<yMax>; otherwise stops looking at bottom
588   // of page.  If found, sets the text bounding rectange and returns
589   // true; otherwise returns false.
590   GBool findText(Unicode *s, int len, GBool top, GBool bottom,
591                  int *xMin, int *yMin, int *xMax, int *yMax);
592
593   // Get the text which is inside the specified rectangle.
594   GString *getText(int xMin, int yMin, int xMax, int yMax);
595
596   GBool isReverseVideo() { return reverseVideo; }
597
598   // Update pixmap ID after a page change.
599   void setPixmap(Pixmap pixmapA, int pixmapWA, int pixmapHA)
600     { pixmap = pixmapA; pixmapW = pixmapWA; pixmapH = pixmapHA; }
601
602   // Get the off-screen pixmap, its size, various display info.
603   Pixmap getPixmap() { return pixmap; }
604   int getPixmapWidth() { return pixmapW; }
605   int getPixmapHeight() { return pixmapH; }
606   Display *getDisplay() { return display; }
607   Guint getDepth() { return depth; }
608
609   Gulong findColor(GfxRGB *rgb);
610
611 private:
612
613   XRef *xref;                   // the xref table for this PDF file
614   Display *display;             // X display pointer
615   int screenNum;                // X screen number
616   Pixmap pixmap;                // pixmap to draw into
617   int pixmapW, pixmapH;         // size of pixmap
618   Guint depth;                  // pixmap depth
619   Visual *visual;               // X visual
620   Colormap colormap;            // X colormap
621   int flatness;                 // line flatness
622   GC paperGC;                   // GC for background
623   GC strokeGC;                  // GC with stroke color
624   GC fillGC;                    // GC with fill color
625   Region clipRegion;            // clipping region
626   GBool trueColor;              // set if using a TrueColor visual
627   int rMul, gMul, bMul;         // RGB multipliers (for TrueColor)
628   int rShift, gShift, bShift;   // RGB shifts (for TrueColor)
629   Gulong                        // color cube
630     colors[maxRGBCube * maxRGBCube * maxRGBCube];
631   unsigned long paperColor;     // paper color (pixel value)
632   int numColors;                // size of color cube
633   double redMap[256];           // map pixel (from color cube) to red value
634   GBool reverseVideo;           // reverse video mode
635   XPoint                        // temporary points array
636     tmpPoints[numTmpPoints];
637   int                           // temporary arrays for fill/clip
638     tmpLengths[numTmpSubpaths];
639   BoundingRect
640     tmpRects[numTmpSubpaths];
641   GfxFont *gfxFont;             // current PDF font
642   XOutputFont *font;            // current font
643   XOutputFontCache *fontCache;  // font cache
644   T3FontCache *                 // Type 3 font cache
645     t3FontCache[xOutT3FontCacheSize];
646   int nT3Fonts;                 // number of valid entries in t3FontCache
647   T3GlyphStack *t3GlyphStack;   // Type 3 glyph context stack
648   XOutputState *save;           // stack of saved states
649
650   TextPage *text;               // text from the current page
651
652   void updateLineAttrs(GfxState *state, GBool updateDash);
653   void doFill(GfxState *state, int rule);
654   void doClip(GfxState *state, int rule);
655   int convertPath(GfxState *state, XPoint **points, int *size,
656                   int *numPoints, int **lengths, GBool fillHack);
657   void convertSubpath(GfxState *state, GfxSubpath *subpath,
658                       XPoint **points, int *size, int *n);
659   void doCurve(XPoint **points, int *size, int *k,
660                double x0, double y0, double x1, double y1,
661                double x2, double y2, double x3, double y3);
662   void addPoint(XPoint **points, int *size, int *k, int x, int y);
663   void drawType3Glyph(T3FontCache *t3Font,
664                       T3FontCacheTag *tag, Guchar *data,
665                       double x, double y, GfxRGB *color);
666   Gulong findColor(GfxRGB *x, GfxRGB *err);
667 };
668
669 #endif