#include <GhostScript.h>
Collaboration diagram for PLearn::GhostScript:
Public Member Functions | |
GhostScript (int width=200, int height=200) | |
opens an X11 ghostscript window | |
GhostScript (const string &filename, real x1, real y1, real x2, real y2) | |
creates an eps file with the (x1,y1;x2,y2) bounding box | |
~GhostScript () | |
void | flush () |
PStream & | operator<< (char *str) |
void | run (const char *filename) |
void | copypage () |
void | showpage () |
void | gsave () |
void | grestore () |
void | translate (real x, real y) |
void | scale (real x, real y) |
void | moveto (real x, real y) |
void | rotate (real angle) |
void | mapping (real sourcex, real sourcey, real sourcewidth, real sourceheight, real destx, real desty, real destwidth, real destheight) |
void | show (const char *str) |
void | show (real x, real y, const char *str, char halign='l', char valign='b') |
halign can be 'l' (left), 'c' (center) or 'r' (right) valign can be 't' (top), 'm' (middle) or 'b' (bottom) | |
void | centerShow (real x, real y, const char *str) |
void | multilineShow (real x, real y, const string &text, real newlinesize, char halign='l', char valign='b') |
accepts multiple line text (lines separated by ) | |
void | show (real x, real y, Vec v) |
void | centerShow (real x, real y, Vec v) |
void | erasepage () |
void | setcolor (real r, real g, real b) |
void | setcolor (real rgb) |
takes color in rgb real as returned by rgb2real | |
void | setcolor (char *colorname) |
void | setgray (real g) |
void | setlinewidth (real w) |
void | setdash (Vec ary, real x=0) |
sets the dash pattern: ary contains the cyclic on-off distances of the dashes, which begin after an offset_of x units from the current point | |
void | drawLine (real x1, real y1, real x2, real y2) |
void | drawArrow (real x1, real y1, real x2, real y2) |
void | drawBox (real x, real y, real width, real height) |
void | fillBox (real x, real y, real width, real height) |
void | drawCross (real x, real y, real r, bool vertical=false, real ry=-1) |
void | drawCircle (real x, real y, real r) |
void | fillCircle (real x, real y, real r) |
void | displayBlack (const Mat &bm, real x, real y, real w, real h, bool painton1=true) |
void | displayGray (const Mat &bm, real x, real y, real w, real h) |
values in bm indicate quantity of light between 0.0 (black) and 1.0 (white) | |
void | displayRGB (const Mat &bm, real x, real y, real w, real h) |
values in bm are those obtained using the rgb2real function (see above) | |
void | usefont (const char *fontname="Times-Roman", real pointsize=12.0) |
Protected Types | |
typedef ios::char_type | char_type |
Static Protected Member Functions | |
void | writeBitmapHexString1Bit (const Mat &bm, PStream &out, bool lastrowfirst=false) |
void | writeBitmapHexString8Bits (const Mat &bm, PStream &out, bool lastrowfirst=false) |
void | writeBitmapHexString24Bits (const Mat &bm, PStream &out, bool lastrowfirst=false) |
Protected Attributes | |
FILE * | gs_cstream |
PStream | togs |
char | command_string [1000] |
bool | isfile |
|
Definition at line 82 of file GhostScript.h. |
|
opens an X11 ghostscript window
Definition at line 80 of file GhostScript.cc. References PLearn::PStream::attach(), command_string, gs_cstream, PLearn::isfile(), PLearn::PStream::outmode, and togs. |
|
creates an eps file with the (x1,y1;x2,y2) bounding box
Definition at line 92 of file GhostScript.cc. References PLearn::PStream::attach(), PLearn::endl(), gs_cstream, PLearn::isfile(), PLearn::PStream::outmode, and togs. |
|
Definition at line 103 of file GhostScript.cc. References PLearn::endl(), gs_cstream, isfile, and togs. |
|
Definition at line 160 of file GhostScript.h. References PLearn::endl(), togs, and x. |
|
Definition at line 151 of file GhostScript.h. References centerShow(), and x. Referenced by centerShow(), PLearn::displayVarGraph(), and PLearn::OldDisplayVarGraph(). |
|
Definition at line 109 of file GhostScript.h. References PLearn::endl(), and togs. Referenced by flush(). |
|
if painton1 is true, then all matrix cells that are different from 0 will be painted in the current color. If painton1 is false, then all cells that are equal to 0 will be painted Definition at line 177 of file GhostScript.cc. References PLearn::endl(), PLearn::TMat< T >::length(), togs, PLearn::TMat< T >::width(), writeBitmapHexString1Bit(), and x. |
|
values in bm indicate quantity of light between 0.0 (black) and 1.0 (white)
Definition at line 195 of file GhostScript.cc. References PLearn::endl(), PLearn::TMat< T >::length(), togs, PLearn::TMat< T >::width(), writeBitmapHexString8Bits(), and x. Referenced by PLearn::displayDecisionSurface(), and PLearn::Grapher::plot_2D_classification(). |
|
values in bm are those obtained using the rgb2real function (see above)
Definition at line 213 of file GhostScript.cc. References PLearn::TMat< T >::length(), togs, PLearn::TMat< T >::width(), writeBitmapHexString24Bits(), and x. Referenced by PLearn::Grapher::plot_2D_classification(). |
|
Definition at line 197 of file GhostScript.h. References drawArrow(), and drawCircle(). Referenced by PLearn::displayVarGraph(), drawArrow(), and PLearn::OldDisplayVarGraph(). |
|
Definition at line 297 of file GhostScript.cc. References PLearn::endl(), togs, and x. Referenced by PLearn::displayVarGraph(), and PLearn::OldDisplayVarGraph(). |
|
Definition at line 317 of file GhostScript.cc. References PLearn::endl(), moveto(), togs, and x. Referenced by PLearn::displayDecisionSurface(), and drawArrow(). |
|
Definition at line 323 of file GhostScript.cc. References drawLine(), PLearn::sqrt(), and x. Referenced by PLearn::displayPoints(). |
|
Definition at line 194 of file GhostScript.h. References drawLine(), PLearn::endl(), and togs. Referenced by drawCross(), and drawLine(). |
|
Definition at line 163 of file GhostScript.h. References PLearn::endl(), and togs. |
|
Definition at line 307 of file GhostScript.cc. References PLearn::endl(), togs, and x. |
|
Definition at line 343 of file GhostScript.cc. References PLearn::endl(), moveto(), togs, and x. Referenced by PLearn::Grapher::plot_2D_classification(). |
|
Definition at line 113 of file GhostScript.cc. References copypage(), PLearn::PStream::flush(), gs_cstream, and togs. |
|
Definition at line 118 of file GhostScript.h. References togs. Referenced by PLearn::displayDecisionSurface(). |
|
Definition at line 115 of file GhostScript.h. References togs. Referenced by PLearn::displayDecisionSurface(). |
|
transforms coordinate system such that the source rectangle will be mapped to the destination rectangle (i.e. you can then use the source coordinate system to do your drawings, and they will be rendered in the destination rectangle). Definition at line 137 of file GhostScript.h. References mapping(). Referenced by PLearn::displayDecisionSurface(), mapping(), and PLearn::Grapher::plot_2D_classification(). |
|
Definition at line 127 of file GhostScript.h. References moveto(), togs, and x. Referenced by drawCircle(), fillCircle(), and moveto(). |
|
accepts multiple line text (lines separated by
Definition at line 286 of file GhostScript.cc. References c_str(), show(), PLearn::split(), and x. |
|
Definition at line 103 of file GhostScript.h. References togs. |
|
Definition at line 130 of file GhostScript.h. References rotate(), and togs. Referenced by rotate(). |
|
Definition at line 106 of file GhostScript.h. References PLearn::endl(), run(), and togs. Referenced by run(). |
|
Definition at line 124 of file GhostScript.h. References scale(), togs, and x. Referenced by scale(). |
|
< default is black Definition at line 270 of file GhostScript.cc. References setcolor(). |
|
takes color in rgb real as returned by rgb2real
Definition at line 170 of file GhostScript.h. References PLearn::real2rgb(). |
|
Definition at line 166 of file GhostScript.h. References setcolor(), and togs. Referenced by PLearn::displayPoints(), PLearn::Grapher::plot_2D_classification(), and setcolor(). |
|
sets the dash pattern: ary contains the cyclic on-off distances of the dashes, which begin after an offset_of x units from the current point
Definition at line 186 of file GhostScript.h. References PLearn::TVec< T >::isEmpty(), setdash(), togs, and x. Referenced by PLearn::displayDecisionSurface(), and setdash(). |
|
Definition at line 179 of file GhostScript.h. References setgray(), and togs. Referenced by PLearn::Grapher::plot_2D_classification(), and setgray(). |
|
Definition at line 182 of file GhostScript.h. References setlinewidth(), and togs. Referenced by PLearn::displayDecisionSurface(), and setlinewidth(). |
|
Definition at line 157 of file GhostScript.h. References PLearn::endl(), togs, PLearn::Vec, and x. |
|
halign can be 'l' (left), 'c' (center) or 'r' (right) valign can be 't' (top), 'm' (middle) or 'b' (bottom)
Definition at line 231 of file GhostScript.cc. References PLearn::endl(), PLERROR, togs, and x. |
|
Definition at line 144 of file GhostScript.h. References PLearn::endl(), show(), and togs. Referenced by multilineShow(), and show(). |
|
Definition at line 112 of file GhostScript.h. References PLearn::endl(), and togs. |
|
Definition at line 121 of file GhostScript.h. References togs, translate(), and x. Referenced by translate(). |
|
Definition at line 223 of file GhostScript.h. References PLearn::endl(), togs, and usefont(). Referenced by PLearn::displayVarGraph(), PLearn::OldDisplayVarGraph(), and usefont(). |
|
Definition at line 120 of file GhostScript.cc. References PLearn::TMat< T >::length(), PLearn::Mat, PLearn::PStream::put(), PLearn::TMat< T >::rowdata(), PLearn::TMat< T >::width(), and PLearn::PStream::writeAsciiHexNum(). Referenced by displayBlack(). |
|
Definition at line 160 of file GhostScript.cc. References PLearn::TMat< T >::length(), PLearn::real2rgb(), PLearn::TMat< T >::rowdata(), PLearn::TMat< T >::width(), and PLearn::PStream::writeAsciiHexNum(). Referenced by displayRGB(). |
|
Definition at line 149 of file GhostScript.cc. References PLearn::TMat< T >::length(), PLearn::TMat< T >::rowdata(), PLearn::TMat< T >::width(), and PLearn::PStream::writeAsciiHexNum(). Referenced by displayGray(). |
|
Definition at line 72 of file GhostScript.h. Referenced by GhostScript(). |
|
Definition at line 70 of file GhostScript.h. Referenced by flush(), GhostScript(), and ~GhostScript(). |
|
Definition at line 73 of file GhostScript.h. Referenced by ~GhostScript(). |
|
Definition at line 71 of file GhostScript.h. Referenced by centerShow(), copypage(), displayBlack(), displayGray(), displayRGB(), drawBox(), drawCircle(), drawLine(), erasepage(), fillBox(), fillCircle(), flush(), GhostScript(), grestore(), gsave(), moveto(), operator<<(), rotate(), run(), scale(), setcolor(), setdash(), setgray(), setlinewidth(), show(), showpage(), translate(), usefont(), and ~GhostScript(). |