#include <PsFile.h>
Membres publics | |
PSFile (const std::string &_nom) | |
void | close () |
void | begin_figure (double xmin, double xmax, double ymin, double ymax, double hmin, double hmax, double vmin, double vmax, int xn, int yn) |
void | end_figure () |
void | begin_document () |
void | begin_page (int page, double xmin, double xmax, double ymin, double ymax, double hmin, double hmax, double vmin, double vmax, int xn, int yn) |
void | end_page () |
void | end_document (int npages) |
void | begin_section (char *title) |
void | end_section () |
void | set_pen (double gray, double width, double dashlength, double dashspace) |
void | draw_segment (double xa, double ya, double xb, double yb) |
void | draw_curve (double xa, double ya, double xb, double yb, double xc, double yc, double xd, double yd) |
void | draw_rectangle (double xlo, double xhi, double ylo, double yhi) |
void | fill_rectangle (double xlo, double xhi, double ylo, double yhi, double gray) |
void | fill_and_draw_rectangle (double xlo, double xhi, double ylo, double yhi, double gray) |
void | fill_circle (double xc, double yc, double radius, double gray) |
void | draw_circle (double xc, double yc, double radius) |
void | fill_and_draw_circle (double xc, double yc, double radius, double gray) |
void | fill_and_draw_lune (double xc, double yc, double radius, double tilt, double gray) |
void | fill_polygon (double x[], double y[], int n, double gray) |
void | draw_polygon (double x[], double y[], int n) |
void | fill_and_draw_polygon (double x[], double y[], int n, double gray) |
void | fill_triangle (double xa, double ya, double xb, double yb, double xc, double yc, double gray) |
void | fill_grid_cell (int xi, int yi, double gray) |
void | draw_coord_line (char axis, double coord) |
void | draw_grid_lines () |
void | set_label_font (char *font, float size) |
void | put_label (char *text, double x, double y, float xalign, float yalign) |
void | draw_frame () |
void | add_caption (char *txt) |
void | put_text (char *text, char *newline) |
PSFile & | operator<< (const std::string &str) |
PSFile & | operator<< (const Model &m) |
Membres protégés | |
void | aux_rectangle (double xlo, double xhi, double ylo, double yhi, double gray, char *op) |
void | aux_polygon (double x[], double y[], int npoints, double gray, char *op) |
void | aux_circle (double xc, double yc, double radius, double gray, char *op) |
void | aux_lune (double xc, double yc, double radius, double tilt, double gray, char *op) |
void | define_procs () |
void | define_caption_procs () |
void | save_scales (double xmin, double xmax, double ymin, double ymax, double hmin, double hmax, double vmin, double vmax) |
void | setup_page_state (int xn, int yn) |
void | setup_caption_data () |
void | aux_end_page () |
Les fonctions ont ete repises d'un programme C et converti en C++. Il y a eut quelques ajouts et quelques modifications.
|
Adds a caption text below the drawing, *outside* the nominal bounding box. |
|
Initializes a (non-encapsulated, multi-page) PS file. A standard PostScript file contains a document with one or more pages, with explicit "show" commands at the end of each page, and no BoundingBox comment. It can be printed by itself. The procedure writes the file's preamble, with auxiliary Postscript ops. The client must call begin_page and end_page around each page. of the document. |
|
Initializes an Encapsulated PostScript file. An Encapsulated PostScript file contains a single figure, with a BoundingBox comment, without an explicit "showpage" command; It is suitable for inclusion in TeX papers and such. This procedure writes the preamble and bounding box, sets coordinate system, clip path, caption font, Postscript ops and constants, etc. Client coordinates will range over [xmin __ xmax] x [ymin __ ymax]. Plotting area is [hmin __ hmax] x [vmin __ vmax] (in pt). The plotting scales dh/dx and dv/dy must be equal. The plotting area is divided implicitly into a grid of /xn/ by /yn/ rectangular "cells". |
|
Starts a new page of a PS document. Sets coordinate system, clip path, dimension constants, etc. Client coordinates will range over [xmin __ xmax] x [ymin __ ymax]. Plotting area is [hmin __ hmax] x [vmin __ vmax] (in pt). The plotting scales dh/dx and dv/dy must be equal. The plotting area is divided implicitly into a grid of /xn/ by /yn/ rectangular "cells". |
|
Starts a new section of a plot. The title is a comment |
|
Draws the circle with given center and radius, using the current pen and gray. |
|
Draws a reference line perpendicular to the given axis at the given coordinate value. |
|
Draws a Bezier arc with given control points, using the current pen and gray. |
|
Draws a frame around the plotting area. (The frame will extend half a line width outside the nominal bounding box.) |
|
Draws the cell boundaries with the current pen and gray level. |
|
Draws the contour of the polygon (x[1],y[1]),.. (x[n],y[n]) using the current pen and gray. |
|
Draws the outline of the given rectangle using the current pen. |
|
Draws segment from (xa,ya) to (xb,yb) with current pen and gray |
|
Finalizes a multipage document. The client must keep track of the number of pages that were written to the file. |
|
Finalizes an Encapsulated PostScript file. |
|
Finalizes a page: Writes page trailer line, etc. |
|
Ends a section of a plot. |
|
Fills the circle with given center and radius, using the given gray, then draws its outline, using the current pen and gray. |
|
Fills the lune with given center, radius, and tilt, using the given gray, then draws its outline, using the current pen and gray. |
|
Fills the polygon (x[1],y[1]),.. (x[n],y[n]) with the given gray level, then draws its contour using the current pen and gray. |
|
Fills rectangle with given gray, then draws its outline with current pen. |
|
Fills the circle with given center and radius, using the given gray. |
|
Fills the given cell of the current cell grid with the given gray level. |
|
Fills the polygon (x[1],y[1]),.. (x[n],y[n]) with the given gray level. |
|
Fills given rectangle with given gray color |
|
Fills triangle /abc/ with given gray level. |
|
Operator overloading |
|
Prints "label" at point (x,y), using the current label font size. The parameter "xalign" (resp. "yalign)" specifies which point of the string's bounding box will end up at (x,y): 0.0 means the left (resp. bottom) side, 1.0 means the right (resp. top) side. Default is (0.5, 0.5), meaning the box will be centered at (x,y). |
|
Writes a text string to /psfile/, in Postscript form, handling special chars and parentheses.
Replaces any embedded ' |
|
Sets the name and point size of the font to be used by put_label. |
|
Sets pen parameters and ink color for line drawing. Dimensions are in *millimeters* |