home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / splot122.zip / DEMO / TEXT.SPT < prev    next >
Text File  |  1993-11-20  |  2KB  |  49 lines

  1. /* This file illustrates some of the capabilities of the */
  2. /* text() command to annotate figures */
  3. /* Several fonts are available including full Greek. */
  4. /* Text can be any size, orientation and colour. */ 
  5.  
  6. #include <splot.h>
  7. main()
  8.    {
  9.    text(2.63,23,"The default position for the next line");
  10.    /* change to complex font for next line */
  11.    set(FONT,COMPLEX);
  12.    text("right below the previous line");
  13.    set(FONT,SIMPLEX);
  14.    text("There is a complete set of Greek characters"); 
  15.    text("!abcdefghijklmnopqrstuvxyz!");
  16.    set(FONT,COMPLEX);
  17.    text("!ABCDEFGHIJKLMNOPQRSTUVWXYZ!");
  18.    set(FONT,SIMPLEX);
  19.    set(LINECOLOUR,GREEN);
  20.    /* optinal change of script scale and position */
  21.    set(SCRIPTSCALE,1);
  22.    set(SCRIPTSHIFT,1);
  23.    text("Here are ^super^ and _sub_ scripts");
  24.    set(LINECOLOUR,RED);
  25.    text("and #Italics# in different colours");
  26.    set(LINECOLOUR,BLACK);
  27.    text("Letters can be large, small, tall, short");
  28.    text("fat, thin, vertical and angled.");
  29.    set(FONTMULT,2);
  30.    text(2.94,9.56,"Large");
  31.    set(FONTMULT,0.30);
  32.    text(8.90,9.71,"small");
  33.    set(FONTWIDTH,1.0);
  34.    set(FONTASPECT,3);
  35.    text(13.10,9.71,"Tall");
  36.    set(FONTASPECT,0.5);
  37.    text(17.05,9.71,"Short");
  38.    set(FONTASPECT,2);
  39.    set(LINEWIDTH,0.01);
  40.    text(2.94,7.29,"Thin");
  41.    set(LINEWIDTH,0.2);
  42.    text(9.02,7.29,"Fat"); 
  43.    set(LINEWIDTH,0.05);
  44.    set(FONTDIR,90);
  45.    text(3.63,1.26,"Vertical");
  46.    set(FONTDIR,130);
  47.    text(11.28,1.44,"Angled");
  48.    }
  49.