# include # include # include # include using namespace std; # include "dislin.H" int main ( int argc, char *argv[] ); //****************************************************************************** int main ( int argc, char *argv[] ) //****************************************************************************** // // Purpose: // // MAIN demonstrates the use of the SYMBOL routine. // // Modified: // // 02 September 2005 // { static char cstr[3]; static char ctit[] = "Symbols"; int i; int nl; int nxp; int ny; cout << "\n"; cout << "DISLIN_EX03:\n"; cout << " Demonstrate the use of the SYMBOL routine, for\n"; cout << " the generation of special symbols and fonts.\n"; // // Specify the format of the output file. // metafl ( "PNG" ); // // Specify the name of the output graphics file. // setfil ( "dislin_ex03.png" ); setpag ( "da4p" ); disini ( ); pagera ( ); complx ( ); height ( 60 ); nl = nlmess ( ctit ); messag ( ctit, ( 2100 - nl ) / 2, 200 ); height ( 50 ); hsymbl ( 120 ); ny = 150; for ( i = 0; i < 24; i++ ) { if ( ( i % 4 ) == 0 ) { ny = ny + 400; nxp = 550; } else { nxp = nxp + 350; } sprintf ( cstr, "%d", i ); nl = nlmess ( cstr ) / 2; messag ( cstr, nxp-nl ,ny+150 ); symbol ( i, nxp, ny ); } disfin ( ); cout << "\n"; cout << "DISLIN_EX03:\n"; cout << " Normal end of execution.\n"; return 0; }