|
Public Member Functions |
| PostscriptDocument::PostscriptDocument () |
| PostscriptDocument::~PostscriptDocument () |
void | setFont (const char *const family="sans", LASi::FontStyle=LASi::NORMAL_STYLE, LASi::FontWeight=LASi::NORMAL_WEIGHT, LASi::FontVariant=LASi::NORMAL_VARIANT, LASi::FontStretch=LASi::NORMAL_STRETCH) |
| Sets the font that all subsequent text written to bodyStream() or footerStream() will be rendered with.
|
void | setFontSize (const double size) |
| Sets the font size, in points, that all subsequent text written to bodyStream() or footerStream() will be rendered with.
|
std::ostringstream & | osHeader () |
| Returns stream for Postscript header.
|
oPostscriptStream & | osBody () |
| Returns stream for Postscript body.
|
oPostscriptStream & | osFooter () |
| Returns stream for Postscript footer.
|
void | write (std::ostream &os) |
| Closes all streams and writes completed Postscript document to os.
|
void | get_dimensions (const char *s, double *lineSpacing, double *xAdvance=NULL, double *yMin=NULL, double *yMax=NULL) |
| Return string dimensions: lineSpacing: inter-line spacing xAdvance: width of the string yMin: y-coordinate bounding the lowest descender, Indic under-consonantal vowel, etc.
|
Protected Types |
typedef std::map< GlyphId,
FreetypeGlyphMgr > | GlyphMap |
| Maps glyph routine name to FT_Glyph instance.
|
typedef void(PostscriptDocument::* | GLYPH_FUNC )(const GlyphMap::value_type &, void *contextData) |
| Pointer to a function that takes a reference to a glyph and to x and y coordinates.
|
Protected Member Functions |
void | invoke_glyph_routine (const GlyphMap::value_type &, void *contextData) |
| Insert a Postscript glyph_routine call into output stream (contextData).
|
void | accrue_dimensions (const GlyphMap::value_type &, void *contextData1) |
| Add the next glyphs dimensions to the bounding box (contextData).
|
void | for_each_glyph_do (const std::string &, const GLYPH_FUNC, void *contextData) |
| Decomposes string into glyphs and applies GLYPH_FUNC to each glyph.
|
PangoContext * | PostscriptDocument::pangoContext () const |
std::string | glyphProcName () const |
double | getFontSize () |
Private Attributes |
GlyphMap | _glyphMap |
ContextMgr * | _pContextMgr |
double | _fontSize |
std::ostringstream | _osHeader |
oPostscriptStream | _osBody |
oPostscriptStream | _osFooter |
Static Private Attributes |
const unsigned int | DRAWING_SCALE = PANGO_SCALE |
Friends |
class | write_glyph_routine_to_stream |
class | show |