File:Eps32x22ringRoster.jpg

Example of the roster graphics in EPS.

The black-gray-white rectangles are plotted with the EPS command image.

The red cross is drawn with the EPS commands moveto, lineto, stroke (simplified to M, L, S in the definitions in the beginning of the file).

The image is generated from with simple C++ program and converted to jpg format by the system command convert with the default options.

EPS version of the file
Two empty lines and the leading spacabars were added in the code below to improve the view and simplify the loading; they do not affect to the conversion of this EPS file to other formats.

%!PS-Adobe-2.0 EPSF-2.0

%%BoundingBox: 0 0 322 222 /RGB {setrgbcolor} bind def /W {setlinewidth} bind def /M {moveto} bind def /L {lineto} bind def /S {stroke} bind def 1 1 translate 10 10 scale gsave 32 22 scale 32 22 4 [32 0 0 -22 0 22] < fffffffffffd73100137dfffffffffff fffffffffe500000000005efffffffff ffffffffc20026acca62002cffffffff fffffffc1018effffffe8101cfffffff ffffffe202cffffffffffc202effffff ffffff501cffffffffffffc105ffffff fffffd008ffffffffffffff800dfffff fffff702effffffffffffffe207fffff fffff306ffffffffffffffff603fffff fffff10affffffffffffffffa01fffff ffffe00cffffffffffffffffc00effff ffffe00cffffffffffffffffc00effff fffff10affffffffffffffffa01fffff fffff306ffffffffffffffff603fffff fffff702effffffffffffffe207fffff fffffd008ffffffffffffff800dfffff ffffff501cffffffffffffc105ffffff ffffffe202cffffffffffc202effffff fffffffc1018effffffe8101cfffffff ffffffffc20026acca62002cffffffff fffffffffe500000000005efffffffff fffffffffffd73100137dfffffffffff > image grestore 16.000 -1.000 M 16.000 23.000 L -1.000 11.000 M 33.000 11.000 L 1 0 0 RGB .3 W S showpage %%Trailer

C++ generator
//The image above is generated with the code below. All the routines are included, no additional files should be loaded for the compilation.

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,"/RGB {setrgbcolor} bind def\n"); fprintf(O,"/W {setlinewidth} bind def\n"); fprintf(O,"/M {moveto} bind def\n"); fprintf(O,"/L {lineto} bind def\n"); fprintf(O,"/S {stroke} bind def\n"); }
 * 1) include
 * 2) include
 * 3) include
 * 4) define DB double

//#define D1(x,y) for(x=1;x=0;n--) { fprintf(o,"\n"); DO(m,M){ fprintf(o,"%1x",int(15.*a[n*M+m]+.5) ); }} fprintf(o,"\n>\n"); fprintf(o,"image\n"); free(a); fprintf(o,"grestore\n"); M(M/2.,-1); L(M/2.,N+1); M(-1,N/2.); L(M+1,N/2.); fprintf(o,"1 0 0 RGB .3 W S\n"); fprintf(o,"showpage\n%c%cTrailer\n",'%','%'); fclose(o); system("epstopdf eps32x22ringRoster.eps"); //system(   "open eps32x22ringRoster.pdf"); system( "convert eps32x22ringRoster.eps eps32x22ringRoster.jpg "); system(   "open eps32x22ringRoster.jpg"); }
 * 1) define M(x,y) fprintf(o,"%6.3f %6.3f M\n",0.+x,0.+y);
 * 2) define L(x,y) fprintf(o,"%6.3f %6.3f L\n",0.+x,0.+y);

Keywords
Some of the following commands of C++ and EPS are listed below:

EPS, roster graphics, C++,

BoundingBox, gsave, grestore,

fopen, fclose, fprintf, malloc, free, system

epstopdf, convert