Ado.cin: Difference between revisions
Jump to navigation
Jump to search
imported>Dmitrii Kouznetsov m (more description of the parameters) |
John Leach (talk | contribs) No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{subpages}} | |||
// '''ado.cin''' is the [[C++]] routine that writes the header of the [[Encapsulated PostSctipt|EPS]] file. This routine is used to make direct graphics from C++ to *.eps | // '''ado.cin''' is the [[C++]] routine that writes the header of the [[Encapsulated PostSctipt|EPS]] file. This routine is used to make direct graphics from C++ to *.eps | ||
// The routine has 3 parameters: O,X and Y. | |||
//The first parameter defines the output file; it is supposed to be open for writing at the moment of call of the routine. | |||
// Parameters X and Y specify the width and the height of the picture in the physical units, used to plot graphics. The dimension-less units are recommended. Various plots in CZ are generated with codes that use this routine. The routine is short, it is reproduced below: | // Parameters X and Y specify the width and the height of the picture in the physical units, used to plot graphics. The dimension-less units are recommended. Various plots in CZ are generated with codes that use this routine. The routine is short, it is reproduced below: | ||
Line 17: | Line 22: | ||
fprintf(O,"/RGB {setrgbcolor} bind def\n");} | fprintf(O,"/RGB {setrgbcolor} bind def\n");} | ||
// click at [[File:TaniaPlot.png|200px]] or [[File:LambertWmapT.png|100px]] for the examples of the use. | |||
<!-- | <!-- | ||
#redirect[[Contour plot/Code/ado.cin]] !--> | #redirect[[Contour plot/Code/ado.cin]] !--> | ||
==References== | |||
{{reflist}} | |||
[[Category:Reviewed Passed]] |
Latest revision as of 05:18, 17 March 2024
// ado.cin is the C++ routine that writes the header of the EPS file. This routine is used to make direct graphics from C++ to *.eps
// The routine has 3 parameters: O,X and Y.
//The first parameter defines the output file; it is supposed to be open for writing at the moment of call of the routine.
// Parameters X and Y specify the width and the height of the picture in the physical units, used to plot graphics. The dimension-less units are recommended. Various plots in CZ are generated with codes that use this routine. The routine is short, it is reproduced below:
void ado(FILE *O, int X, int Y) { fprintf(O,"%c!PS-Adobe-2.0 EPSF-2.0\n",'%'); fprintf(O,"%c%cBoundingBox: 0 0 %d %d\n",'%','%',X,Y); fprintf(O,"/M {moveto} bind def\n"); fprintf(O,"/L {lineto} bind def\n"); fprintf(O,"/S {stroke} bind def\n"); fprintf(O,"/s {show newpath} bind def\n"); fprintf(O,"/C {closepath} bind def\n"); fprintf(O,"/F {fill} bind def\n"); fprintf(O,"/o {.1 0 360 arc C S} bind def\n"); fprintf(O,"/times-Roman findfont 20 scalefont setfont\n"); fprintf(O,"/W {setlinewidth} bind def\n"); fprintf(O,"/RGB {setrgbcolor} bind def\n");}
// click at or for the examples of the use.