diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1999-08-06 00:14:27 (GMT) |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-08-06 00:14:27 (GMT) |
commit | 50e9d31c05e9ca11ad43cc570556094782c1b956 (patch) | |
tree | e8d30241d1f97d7a52ad4486089a74e55160ad78 /pdf/xpdf/TextOutputDev.h | |
parent | bd7dce23fec36adeb1713c164d594bbc0436b346 (diff) |
Painful merge.
Painful merge.
I merged the latest release into the CVS.
This version supports the regular xpdf or gpdf if the GNOME libraries
are found.
Miguel.
Diffstat (limited to 'pdf/xpdf/TextOutputDev.h')
-rw-r--r-- | pdf/xpdf/TextOutputDev.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/pdf/xpdf/TextOutputDev.h b/pdf/xpdf/TextOutputDev.h index 8c1cc77..f13a23a 100644 --- a/pdf/xpdf/TextOutputDev.h +++ b/pdf/xpdf/TextOutputDev.h @@ -15,10 +15,10 @@ #include <stdio.h> #include "gtypes.h" +#include "GfxFont.h" #include "OutputDev.h" class GfxState; -class GfxFont; class GString; //------------------------------------------------------------------------ @@ -39,6 +39,11 @@ public: double dx, double dy, Guchar c, GBool useASCII7); + // Add a 16-bit character to the string. + void addChar16(GfxState *state, double x, double y, + double dx, double dy, + int c, GfxFontCharSet16 charSet); + private: double xMin, xMax; // bounding box x coordinates @@ -61,7 +66,7 @@ class TextPage { public: // Constructor. - TextPage(GBool useASCII71); + TextPage(GBool useASCII7, GBool rawOrder); // Destructor. ~TextPage(); @@ -73,6 +78,11 @@ public: void addChar(GfxState *state, double x, double y, double dx, double dy, Guchar c); + // Add a 16-bit character to the current string. + void addChar16(GfxState *state, double x, double y, + double dx, double dy, int c, + GfxFontCharSet16 charSet); + // End the current string, sorting it into the list of strings. void endString(); @@ -101,11 +111,13 @@ public: private: GBool useASCII7; // use 7-bit ASCII? + GBool rawOrder; // keep strings in content stream order TextString *curStr; // currently active string TextString *yxStrings; // strings in y-major order TextString *xyStrings; // strings in x-major order + TextString *yxCur1, *yxCur2; // cursors for yxStrings list }; //------------------------------------------------------------------------ @@ -118,8 +130,10 @@ public: // Open a text output file. If <fileName> is NULL, no file is written // (this is useful, e.g., for searching text). If <useASCII7> is true, // text is converted to 7-bit ASCII; otherwise, text is converted to - // 8-bit ISO Latin-1. - TextOutputDev(char *fileName, GBool useASCII7); + // 8-bit ISO Latin-1. <useASCII7> should also be set for Japanese + // (EUC-JP) text. If <rawOrder> is true, the text is kept in content + // stream order. + TextOutputDev(char *fileName, GBool useASCII7, GBool rawOrder); // Destructor. virtual ~TextOutputDev(); @@ -152,6 +166,8 @@ public: virtual void endString(GfxState *state); virtual void drawChar(GfxState *state, double x, double y, double dx, double dy, Guchar c); + virtual void drawChar16(GfxState *state, double x, double y, + double dx, double dy, int c); //----- special access @@ -169,6 +185,7 @@ private: FILE *f; // text file GBool needClose; // need to close the file? TextPage *text; // text for the current page + GBool rawOrder; // keep text in content stream order GBool hexCodes; // subsetted font with hex char codes GBool ok; // set up ok? }; |