Page principale | Liste des namespaces | Hiérarchie des classes | Liste alphabétique | Liste des classes | Liste des fichiers | Membres de namespace | Membres de classe | Membres de fichier

Référence de la classe Modelib::PSFile

#include <PsFile.h>

Graphe de collaboration de Modelib::PSFile:

Collaboration graph
[légende]
Liste de tous les membres

Fonctions membres publiques

 PSFile ()
 PSFile (const std::string &_nom)
 ~PSFile ()
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)
PSFileoperator<< (const std::string &str)
PSFileoperator<< (const Model &m)

Fonctions membres protégées

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 ()

Attributs privés

std::string nom
std::ofstream psfile
double hmin
double hmax
double vmin
double vmax
double xmin
double xmax
double xscale
double ymin
double ymax
double yscale

Description détaillée

Classe permettant de gerer/generer des fichier de type PostScript

Les fonctions ont ete repises d'un programme C et converti en C++. Il y a eut quelques ajouts et quelques modifications.

Définition à la ligne 49 du fichier PsFile.h.


Documentation des contructeurs et destructeur

Modelib::PSFile::PSFile  )  [inline]
 

Définition à la ligne 103 du fichier PsFile.h.

Modelib::PSFile::PSFile const std::string &  _nom  )  [inline]
 

Définition à la ligne 104 du fichier PsFile.h.

Références begin_document(), begin_page(), nom, et psfile.

Voici le graphe d'appel pour cette fonction:

Modelib::PSFile::~PSFile  )  [inline]
 

Définition à la ligne 113 du fichier PsFile.h.

Références end_document(), end_page(), et psfile.

Voici le graphe d'appel pour cette fonction:


Documentation des fonctions membres

void Modelib::PSFile::add_caption char *  txt  ) 
 

Adds a caption text below the drawing, *outside* the nominal bounding box.

Définition à la ligne 577 du fichier PsFile.cpp.

Références psfile, et put_text().

Référencé par operator<<().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::aux_circle double  xc,
double  yc,
double  radius,
double  gray,
char *  op
[protected]
 

Définition à la ligne 781 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

Référencé par draw_circle(), fill_and_draw_circle(), et fill_circle().

void Modelib::PSFile::aux_end_page  )  [protected]
 

Définition à la ligne 555 du fichier PsFile.cpp.

Références psfile.

Référencé par end_figure(), et end_page().

void Modelib::PSFile::aux_lune double  xc,
double  yc,
double  radius,
double  tilt,
double  gray,
char *  op
[protected]
 

Définition à la ligne 819 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

Référencé par fill_and_draw_lune().

void Modelib::PSFile::aux_polygon double  x[],
double  y[],
int  npoints,
double  gray,
char *  op
[protected]
 

Définition à la ligne 729 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

Référencé par draw_polygon(), fill_and_draw_polygon(), et fill_polygon().

void Modelib::PSFile::aux_rectangle double  xlo,
double  xhi,
double  ylo,
double  yhi,
double  gray,
char *  op
[protected]
 

Définition à la ligne 682 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

Référencé par draw_rectangle(), fill_and_draw_rectangle(), et fill_rectangle().

void Modelib::PSFile::begin_document  ) 
 

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.

Définition à la ligne 92 du fichier PsFile.cpp.

Références define_caption_procs(), define_procs(), et psfile.

Référencé par PSFile().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::begin_figure double  xmin,
double  xmax,
double  ymin,
double  ymax,
double  hmin,
double  hmax,
double  vmin,
double  vmax,
int  xn,
int  yn
 

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".

Définition à la ligne 42 du fichier PsFile.cpp.

Références define_caption_procs(), define_procs(), hmax, hmin, psfile, save_scales(), setup_caption_data(), setup_page_state(), vmax, et vmin.

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::begin_page int  page,
double  xmin,
double  xmax,
double  ymin,
double  ymax,
double  hmin,
double  hmax,
double  vmin,
double  vmax,
int  xn,
int  yn
 

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".

Définition à la ligne 117 du fichier PsFile.cpp.

Références psfile, save_scales(), setup_caption_data(), et setup_page_state().

Référencé par PSFile().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::begin_section char *  title  ) 
 

Starts a new section of a plot. The title is a comment

Définition à la ligne 565 du fichier PsFile.cpp.

Références psfile.

Référencé par draw_frame().

void Modelib::PSFile::close  )  [inline]
 

Définition à la ligne 120 du fichier PsFile.h.

Références psfile.

void Modelib::PSFile::define_caption_procs  )  [protected]
 

Définition à la ligne 470 du fichier PsFile.cpp.

Références psfile.

Référencé par begin_document(), et begin_figure().

void Modelib::PSFile::define_procs  )  [protected]
 

Définition à la ligne 181 du fichier PsFile.cpp.

Références psfile.

Référencé par begin_document(), et begin_figure().

void Modelib::PSFile::draw_circle double  xc,
double  yc,
double  radius
 

Draws the circle with given center and radius, using the current pen and gray.

Définition à la ligne 804 du fichier PsFile.cpp.

Références aux_circle().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::draw_coord_line char  axis,
double  coord
 

Draws a reference line perpendicular to the given axis at the given coordinate value.

Définition à la ligne 866 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

void Modelib::PSFile::draw_curve double  xa,
double  ya,
double  xb,
double  yb,
double  xc,
double  yc,
double  xd,
double  yd
 

Draws a Bezier arc with given control points, using the current pen and gray.

Définition à la ligne 662 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

void Modelib::PSFile::draw_frame  ) 
 

Draws a frame around the plotting area. (The frame will extend half a line width outside the nominal bounding box.)

Définition à la ligne 609 du fichier PsFile.cpp.

Références begin_section(), end_section(), et psfile.

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::draw_grid_lines  ) 
 

Draws the cell boundaries with the current pen and gray level.

Définition à la ligne 880 du fichier PsFile.cpp.

Références psfile.

void Modelib::PSFile::draw_polygon double  x[],
double  y[],
int  n
 

Draws the contour of the polygon (x[1],y[1]),.. (x[n],y[n]) using the current pen and gray.

Définition à la ligne 755 du fichier PsFile.cpp.

Références aux_polygon().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::draw_rectangle double  xlo,
double  xhi,
double  ylo,
double  yhi
 

Draws the outline of the given rectangle using the current pen.

Définition à la ligne 700 du fichier PsFile.cpp.

Références aux_rectangle().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::draw_segment double  xa,
double  ya,
double  xb,
double  yb
 

Draws segment from (xa,ya) to (xb,yb) with current pen and gray

Définition à la ligne 648 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

void Modelib::PSFile::end_document int  npages  ) 
 

Finalizes a multipage document. The client must keep track of the number of pages that were written to the file.

Définition à la ligne 110 du fichier PsFile.cpp.

Références psfile.

Référencé par ~PSFile().

void Modelib::PSFile::end_figure  ) 
 

Finalizes an Encapsulated PostScript file.

Définition à la ligne 85 du fichier PsFile.cpp.

Références aux_end_page(), et psfile.

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::end_page  ) 
 

Finalizes a page: Writes page trailer line, etc.

Définition à la ligne 153 du fichier PsFile.cpp.

Références aux_end_page(), et psfile.

Référencé par ~PSFile().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::end_section  ) 
 

Ends a section of a plot.

Définition à la ligne 571 du fichier PsFile.cpp.

Références psfile.

Référencé par draw_frame().

void Modelib::PSFile::fill_and_draw_circle double  xc,
double  yc,
double  radius,
double  gray
 

Fills the circle with given center and radius, using the given gray, then draws its outline, using the current pen and gray.

Définition à la ligne 811 du fichier PsFile.cpp.

Références aux_circle().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::fill_and_draw_lune double  xc,
double  yc,
double  radius,
double  tilt,
double  gray
 

Fills the lune with given center, radius, and tilt, using the given gray, then draws its outline, using the current pen and gray.

Définition à la ligne 835 du fichier PsFile.cpp.

Références aux_lune().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::fill_and_draw_polygon double  x[],
double  y[],
int  n,
double  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.

Définition à la ligne 772 du fichier PsFile.cpp.

Références aux_polygon().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::fill_and_draw_rectangle double  xlo,
double  xhi,
double  ylo,
double  yhi,
double  gray
 

Fills rectangle with given gray, then draws its outline with current pen.

Définition à la ligne 719 du fichier PsFile.cpp.

Références aux_rectangle().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::fill_circle double  xc,
double  yc,
double  radius,
double  gray
 

Fills the circle with given center and radius, using the given gray.

Définition à la ligne 796 du fichier PsFile.cpp.

Références aux_circle().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::fill_grid_cell int  xi,
int  yi,
double  gray
 

Fills the given cell of the current cell grid with the given gray level.

Définition à la ligne 860 du fichier PsFile.cpp.

Références psfile.

void Modelib::PSFile::fill_polygon double  x[],
double  y[],
int  n,
double  gray
 

Fills the polygon (x[1],y[1]),.. (x[n],y[n]) with the given gray level.

Définition à la ligne 763 du fichier PsFile.cpp.

Références aux_polygon().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::fill_rectangle double  xlo,
double  xhi,
double  ylo,
double  yhi,
double  gray
 

Fills given rectangle with given gray color

Définition à la ligne 709 du fichier PsFile.cpp.

Références aux_rectangle().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::fill_triangle double  xa,
double  ya,
double  xb,
double  yb,
double  xc,
double  yc,
double  gray
 

Fills triangle /abc/ with given gray level.

Définition à la ligne 843 du fichier PsFile.cpp.

Références hmin, psfile, vmin, xmin, xscale, ymin, et yscale.

PSFile & Modelib::PSFile::operator<< const Model m  ) 
 

Définition à la ligne 920 du fichier PsFile.cpp.

Références psfile.

PSFile& Modelib::PSFile::operator<< const std::string &  str  )  [inline]
 

Operator overloading

Définition à la ligne 398 du fichier PsFile.h.

Références add_caption().

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::put_label char *  text,
double  x,
double  y,
float  xalign,
float  yalign
 

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).

Définition à la ligne 595 du fichier PsFile.cpp.

Références hmin, psfile, put_text(), vmin, xmin, xscale, ymin, et yscale.

Voici le graphe d'appel pour cette fonction:

void Modelib::PSFile::put_text char *  text,
char *  newline
 

Writes a text string to /psfile/, in Postscript form, handling special chars and parentheses.

Replaces any embedded '
' by the given /newline/ string.

Définition à la ligne 896 du fichier PsFile.cpp.

Références psfile.

Référencé par add_caption(), et put_label().

void Modelib::PSFile::save_scales double  xmin,
double  xmax,
double  ymin,
double  ymax,
double  hmin,
double  hmax,
double  vmin,
double  vmax
[protected]
 

Définition à la ligne 160 du fichier PsFile.cpp.

Références hmax, hmin, vmax, vmin, xmax, xmin, xscale, ymax, ymin, et yscale.

Référencé par begin_figure(), et begin_page().

void Modelib::PSFile::set_label_font char *  font,
float  size
 

Sets the name and point size of the font to be used by put_label.

Définition à la ligne 585 du fichier PsFile.cpp.

Références psfile.

Référencé par setup_page_state().

void Modelib::PSFile::set_pen double  gray,
double  width,
double  dashlength,
double  dashspace
 

Sets pen parameters and ink color for line drawing. Dimensions are in *millimeters*

Définition à la ligne 626 du fichier PsFile.cpp.

Références psfile.

void Modelib::PSFile::setup_caption_data  )  [protected]
 

Définition à la ligne 539 du fichier PsFile.cpp.

Références psfile.

Référencé par begin_figure(), et begin_page().

void Modelib::PSFile::setup_page_state int  xn,
int  yn
[protected]
 

Définition à la ligne 495 du fichier PsFile.cpp.

Références hmax, hmin, psfile, set_label_font(), vmax, et vmin.

Référencé par begin_figure(), et begin_page().

Voici le graphe d'appel pour cette fonction:


Documentation des données membres

double Modelib::PSFile::hmax [private]
 

Définition à la ligne 54 du fichier PsFile.h.

Référencé par begin_figure(), save_scales(), et setup_page_state().

double Modelib::PSFile::hmin [private]
 

Définition à la ligne 54 du fichier PsFile.h.

Référencé par aux_circle(), aux_lune(), aux_polygon(), aux_rectangle(), begin_figure(), draw_coord_line(), draw_curve(), draw_segment(), fill_triangle(), put_label(), save_scales(), et setup_page_state().

std::string Modelib::PSFile::nom [private]
 

Définition à la ligne 51 du fichier PsFile.h.

Référencé par PSFile().

std::ofstream Modelib::PSFile::psfile [private]
 

Définition à la ligne 52 du fichier PsFile.h.

Référencé par add_caption(), aux_circle(), aux_end_page(), aux_lune(), aux_polygon(), aux_rectangle(), begin_document(), begin_figure(), begin_page(), begin_section(), close(), define_caption_procs(), define_procs(), draw_coord_line(), draw_curve(), draw_frame(), draw_grid_lines(), draw_segment(), end_document(), end_figure(), end_page(), end_section(), fill_grid_cell(), fill_triangle(), operator<<(), PSFile(), put_label(), put_text(), set_label_font(), set_pen(), setup_caption_data(), setup_page_state(), et ~PSFile().

double Modelib::PSFile::vmax [private]
 

Définition à la ligne 55 du fichier PsFile.h.

Référencé par begin_figure(), save_scales(), et setup_page_state().

double Modelib::PSFile::vmin [private]
 

Définition à la ligne 55 du fichier PsFile.h.

Référencé par aux_circle(), aux_lune(), aux_polygon(), aux_rectangle(), begin_figure(), draw_coord_line(), draw_curve(), draw_segment(), fill_triangle(), put_label(), save_scales(), et setup_page_state().

double Modelib::PSFile::xmax [private]
 

Définition à la ligne 56 du fichier PsFile.h.

Référencé par save_scales().

double Modelib::PSFile::xmin [private]
 

Définition à la ligne 56 du fichier PsFile.h.

Référencé par aux_circle(), aux_lune(), aux_polygon(), aux_rectangle(), draw_coord_line(), draw_curve(), draw_segment(), fill_triangle(), put_label(), et save_scales().

double Modelib::PSFile::xscale [private]
 

Définition à la ligne 56 du fichier PsFile.h.

Référencé par aux_circle(), aux_lune(), aux_polygon(), aux_rectangle(), draw_coord_line(), draw_curve(), draw_segment(), fill_triangle(), put_label(), et save_scales().

double Modelib::PSFile::ymax [private]
 

Définition à la ligne 57 du fichier PsFile.h.

Référencé par save_scales().

double Modelib::PSFile::ymin [private]
 

Définition à la ligne 57 du fichier PsFile.h.

Référencé par aux_circle(), aux_lune(), aux_polygon(), aux_rectangle(), draw_coord_line(), draw_curve(), draw_segment(), fill_triangle(), put_label(), et save_scales().

double Modelib::PSFile::yscale [private]
 

Définition à la ligne 57 du fichier PsFile.h.

Référencé par aux_circle(), aux_lune(), aux_polygon(), aux_rectangle(), draw_coord_line(), draw_curve(), draw_segment(), fill_triangle(), put_label(), et save_scales().


La documentation de cette classe a été générée à partir des fichiers suivants:
Généré le Sun Oct 2 19:14:37 2005 pour Modelib par  doxygen 1.4.4