Composes Postscript document as three separate and independant streams for header, body and footer.
More...
Public Member Functions |
| | 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, double llx=0, double lly=0, double urx=0, double ury=0) |
| | 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.
|
| void | get_dimensions (std::string s, double *lineSpacing, double *xAdvance=NULL, double *yMin=NULL, double *yMax=NULL) |
Composes Postscript document as three separate and independant streams for header, body and footer.
Body and footer streams respond to LASi::show applicator which generates Postscript commands to display a string by using glyph routines instead of a Postscript font.
| void LASi::PostscriptDocument::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.
yMax: y-coordinate bounding the highest ascender, diacritic, Indic over-letter vowel, etc.
| void LASi::PostscriptDocument::write |
( |
std::ostream & |
os, |
|
|
double |
llx = 0, |
|
|
double |
lly = 0, |
|
|
double |
urx = 0, |
|
|
double |
ury = 0 |
|
) |
| |
Closes all streams and writes completed Postscript document to os.
Header will include glyph routines for all text glyphs in body and footer.
2006.05.01.ET Addendum: To create an EPS document, just include the the four BoundingBox coordinates llx, lly, urx, ury (dimensions in points). These are optional parameters – When not included, you'll get a regular PS document. When included, you'll get an EPS document.