diff options
author | Joshua Richardson <jric@chegg.com> | 2011-08-18 18:48:40 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-08-18 18:48:40 +0200 |
commit | 86271e4810f714d4ba7a2a6651a9b1d04f653262 (patch) | |
tree | 0245a9b7b41a984be0163f405e603c813a240874 /utils/HtmlFonts.h | |
parent | 56248b84e2185483dd54704c13838e8f78029d49 (diff) |
pdftohtml: Support text rotation
Includes a few other fixlets.
See bug 38586 for more info
Diffstat (limited to 'utils/HtmlFonts.h')
-rw-r--r-- | utils/HtmlFonts.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/HtmlFonts.h b/utils/HtmlFonts.h index 2cdea4bd..3e3b0282 100644 --- a/utils/HtmlFonts.h +++ b/utils/HtmlFonts.h @@ -20,6 +20,7 @@ // Copyright (C) 2010 OSSD CDAC Mumbai by Leena Chourey (leenac@cdacmumbai.in) and Onkar Potdar (onkar@cdacmumbai.in) // Copyright (C) 2010 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2011 Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk> +// Copyright (C) 2011 Joshua Richardson <jric@chegg.com> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -62,13 +63,15 @@ class HtmlFont{ int lineSize; GBool italic; GBool bold; + GBool rotOrSkewed; int pos; // position of the font name in the fonts array static GooString *DefaultFont; GooString *FontName; HtmlFontColor color; + double rotSkewMat[4]; // only four values needed for rotation and skew public: - HtmlFont(){FontName=NULL;}; + HtmlFont(){FontName=NULL; rotOrSkewed = gFalse;} HtmlFont(GooString* fontname,int _size, GfxRGB rgb); HtmlFont(const HtmlFont& x); HtmlFont& operator=(const HtmlFont& x); @@ -78,9 +81,13 @@ public: GooString* getFullName(); GBool isItalic() const {return italic;} GBool isBold() const {return bold;} + GBool isRotOrSkewed() const { return rotOrSkewed; } unsigned int getSize() const {return size;} int getLineSize() const {return lineSize;} void setLineSize(int _lineSize) { lineSize = _lineSize; } + void setRotMat(const double * const mat) + { rotOrSkewed = gTrue; memcpy(rotSkewMat, mat, sizeof(rotSkewMat)); } + const double *getRotMat() const { return rotSkewMat; } GooString* getFontName(); static GooString* getDefaultFont(); static void setDefaultFont(GooString* defaultFont); @@ -102,7 +109,6 @@ public: HtmlFont *Get(int i){ return &(*accu)[i]; } - GooString* getCSStyle (int i,GooString* content, int j = 0); GooString* CSStyle(int i, int j = 0); int size() const {return accu->size();} |