diff options
author | Martin Kretzschmar <mkretzschmar@src.gnome.org> | 2004-05-17 19:37:57 (GMT) |
---|---|---|
committer | Martin Kretzschmar <mkretzschmar@src.gnome.org> | 2004-05-17 19:37:57 (GMT) |
commit | 6c85243ff859071be4fd2a3847b0fc2086206d31 (patch) | |
tree | 68b85384564a33061b32d5668c0eff7067a39ffc /pdf/xpdf/SFont.h | |
parent | af15b57b30fcf442262f3a797d169d6bc3c1a44a (diff) |
Imported Xpdf 3.00 and fixed build.
* ANNOUNCE:
* CHANGES:
* Makefile.am:
* README:
* aconf-win32.h:
* configure.in:
* dj_make.bat:
* doc/pdffonts.1:
* doc/pdffonts.cat:
* doc/pdffonts.hlp:
* doc/pdfimages.1:
* doc/pdfimages.cat:
* doc/pdfimages.hlp:
* doc/pdfinfo.1:
* doc/pdfinfo.cat:
* doc/pdfinfo.hlp:
* doc/pdftopbm.1:
* doc/pdftopbm.cat:
* doc/pdftopbm.hlp:
* doc/pdftops.1:
* doc/pdftops.cat:
* doc/pdftops.hlp:
* doc/pdftotext.1:
* doc/pdftotext.cat:
* doc/pdftotext.hlp:
* doc/xpdf.1:
* doc/xpdf.cat:
* doc/xpdf.hlp:
* doc/xpdfrc.5:
* doc/xpdfrc.cat:
* doc/xpdfrc.hlp:
* fofi/Makefile.in:
* goo/GHash.cc:
* goo/GHash.h:
* ms_make.bat:
* splash/Makefile.in:
* xpdf/DisplayFontTable.h:
* xpdf/ErrorCodes.h:
* xpdf/FTFont.cc:
* xpdf/FTFont.h:
* xpdf/FontFile.cc:
* xpdf/FontFile.h:
* xpdf/Function.h:
* xpdf/GPOutputDev.cc:
* xpdf/Gfx.cc:
* xpdf/Gfx.h:
* xpdf/GfxFont.cc:
* xpdf/GfxFont.h:
* xpdf/GfxState.cc:
* xpdf/GfxState.h:
* xpdf/GlobalParams.cc:
* xpdf/GlobalParams.h:
* xpdf/Makefile.am:
* xpdf/Object.cc:
* xpdf/Object.h:
* xpdf/Outline.cc:
* xpdf/OutputDev.cc:
* xpdf/OutputDev.h:
* xpdf/PBMOutputDev.cc:
* xpdf/PBMOutputDev.h:
* xpdf/PDFDoc.cc:
* xpdf/PDFDoc.h:
* xpdf/PSOutputDev.cc:
* xpdf/PSOutputDev.h:
* xpdf/Page.cc:
* xpdf/Page.h:
* xpdf/Parser.cc:
* xpdf/SFont.cc:
* xpdf/SFont.h:
* xpdf/Stream.cc:
* xpdf/Stream.h:
* xpdf/T1Font.cc:
* xpdf/T1Font.h:
* xpdf/TTFont.cc:
* xpdf/TTFont.h:
* xpdf/TextOutputDev.cc:
* xpdf/TextOutputDev.h:
* xpdf/XOutputDev.cc:
* xpdf/XOutputDev.h:
* xpdf/XPixmapOutputDev.cc:
* xpdf/XPixmapOutputDev.h:
* xpdf/XRef.cc:
* xpdf/XRef.h:
* xpdf/config.h:
* xpdf/gpdf-control.cc:
* xpdf/pdffonts.cc:
* xpdf/pdfimages.cc:
* xpdf/pdfinfo.cc:
* xpdf/pdftopbm.cc:
* xpdf/pdftops.cc:
* xpdf/pdftotext.cc:
* xpdf/tests/Makefile.am:
* xpdf/vms_make.com:
* xpdf/xpdf.cc: Imported Xpdf 3.00 and fixed build.
Diffstat (limited to 'pdf/xpdf/SFont.h')
-rw-r--r-- | pdf/xpdf/SFont.h | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/pdf/xpdf/SFont.h b/pdf/xpdf/SFont.h deleted file mode 100644 index aadf991..0000000 --- a/pdf/xpdf/SFont.h +++ /dev/null @@ -1,142 +0,0 @@ -//======================================================================== -// -// SFont.h -// -// Base class for font rasterizers. -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef SFONT_H -#define SFONT_H - -#include <aconf.h> - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include <X11/Xlib.h> -#include <X11/Xutil.h> -#include "gtypes.h" -#include "CharTypes.h" - -class GfxState; - -//------------------------------------------------------------------------ - -class SFontEngine { -public: - - SFontEngine(Display *displayA, Visual *visualA, int depthA, - Colormap colormapA); - virtual ~SFontEngine(); - - // Use a TrueColor visual. Pixel values are computed as: - // - // (r << rShift) + (g << gShift) + (b << bShift) - // - // where r, g, and b are scaled to the ranges [0,rMax], [0,gMax], - // and [0,bMax], respectively. - virtual void useTrueColor(int rMaxA, int rShiftA, int gMaxA, int gShiftA, - int bMaxA, int bShiftA); - - // Use an RGB color cube. <colors> is an array containing - // <nRGB>*<nRGB>*<nRGB> pixel values in red,green,blue order, e.g., - // for <nRGB>=2, there will be 8 entries: - // - // |--- colors[i] ---| - // i red green blue - // - ----- ----- ----- - // 0 0000 0000 0000 - // 1 0000 0000 ffff - // 2 0000 ffff 0000 - // 3 0000 ffff ffff - // 4 ffff 0000 0000 - // 5 ffff 0000 ffff - // 6 ffff ffff 0000 - // 7 ffff ffff ffff - // - // The <colors> array is not copied and must remain valid for the - // lifetime of this SFont object. - virtual void useColorCube(Gulong *colorsA, int nRGBA); - -protected: - - // Find the closest match to (<r>,<g>,<b>). - Gulong findColor(int r, int g, int b); - - //----- X parameters - Display *display; - Visual *visual; - int depth; - Colormap colormap; - - GBool trueColor; // true for TrueColor, false for RGB cube - - //----- TrueColor parameters - int rMax, gMax, bMax; - int rShift, gShift, bShift; - - //----- RGB color cube parameters - Gulong *colors; - int nRGB; -}; - -//------------------------------------------------------------------------ - -class SFontFile { -public: - - // A typical subclass will provide a constructor along the lines of: - // - // SomeFontFile(SomeFontEngine *engine, char *fontFileName); - SFontFile(); - - virtual ~SFontFile(); - -private: -}; - -//------------------------------------------------------------------------ - -class SFont { -public: - - // A typical subclass will provide a constructor along the lines of: - // - // SomeFont(SomeFontFile *fontFile, double *m); - // - // where <m> is a transform matrix consisting of four elements, - // using the PostScript ordering conventions (without any - // translation): - // - // [x' y'] = [x y] * [m0 m1] - // [m2 m3] - // - // This is the level at which fonts are cached, and so the font - // cannot be transformed after it is created. - SFont(); - - virtual ~SFont(); - - // Draw a character <c>/<u> at <x>,<y> in color (<r>,<g>,<b>). The - // RGB values should each be in the range [0,65535]. Draws into - // <d>, clipped to the rectangle (0,0)-(<w>-1,<h>-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, - 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: -}; - -#endif |