X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pdf%2Fxpdf%2FSFont.h;h=aadf991caf53db8e1ad454636dbc5d587b2e1651;hb=884f739665dc56e66f51e104350f2affd33f2dd8;hp=4758664fa1327d817bcc4a02a3e492eb9282e8f1;hpb=7aac8dc8533347e21311b15186e0af82f1b22fd6;p=evince.git diff --git a/pdf/xpdf/SFont.h b/pdf/xpdf/SFont.h index 4758664f..aadf991c 100644 --- a/pdf/xpdf/SFont.h +++ b/pdf/xpdf/SFont.h @@ -4,26 +4,33 @@ // // Base class for font rasterizers. // +// Copyright 2001-2003 Glyph & Cog, LLC +// //======================================================================== #ifndef SFONT_H #define SFONT_H -#ifdef __GNUC__ +#include + +#ifdef USE_GCC_PRAGMAS #pragma interface #endif #include #include #include "gtypes.h" +#include "CharTypes.h" + +class GfxState; //------------------------------------------------------------------------ class SFontEngine { public: - SFontEngine(Display *display, Visual *visual, int depth, - Colormap colormap); + SFontEngine(Display *displayA, Visual *visualA, int depthA, + Colormap colormapA); virtual ~SFontEngine(); // Use a TrueColor visual. Pixel values are computed as: @@ -32,8 +39,8 @@ public: // // where r, g, and b are scaled to the ranges [0,rMax], [0,gMax], // and [0,bMax], respectively. - virtual void useTrueColor(int rMax, int rShift, int gMax, int gShift, - int bMax, int bShift); + virtual void useTrueColor(int rMaxA, int rShiftA, int gMaxA, int gShiftA, + int bMaxA, int bShiftA); // Use an RGB color cube. is an array containing // ** pixel values in red,green,blue order, e.g., @@ -53,7 +60,7 @@ public: // // The array is not copied and must remain valid for the // lifetime of this SFont object. - virtual void useColorCube(Gulong *colors, int nRGB); + virtual void useColorCube(Gulong *colorsA, int nRGBA); protected: @@ -114,12 +121,20 @@ public: virtual ~SFont(); - // Draw a character at , in color (,,). The RGB - // values should each be in the range [0,65535]. Draws into , - // clipped to the rectangle (0,0)-(-1,-1). Returns true if - // the character was drawn successfully. + // Draw a character / at , in color (,,). The + // RGB values should each be in the range [0,65535]. Draws into + // , clipped to the rectangle (0,0)-(-1,-1). Returns true + // if the character was drawn successfully. virtual GBool drawChar(Drawable d, int w, int h, GC gc, - int x, int y, int r, int g, int b, Gushort c) = 0; + int x, int y, int r, int g, int b, + CharCode c, Unicode u) = 0; + + // Add the outline of the specified character to the current path by + // calling state->moveTo, lineTo, and curveTo. Returns true if + // successful. If this SFont subclass doesn't implement character + // paths, returns false immediately without modifying the current + // path. + virtual GBool getCharPath(CharCode c, Unicode u, GfxState *state); protected: };