home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 February
/
PCWK0296.iso
/
sharewar
/
os2
/
grafika
/
splot
/
demo
/
text.spt
< prev
next >
Wrap
Text File
|
1993-11-20
|
2KB
|
49 lines
/* This file illustrates some of the capabilities of the */
/* text() command to annotate figures */
/* Several fonts are available including full Greek. */
/* Text can be any size, orientation and colour. */
#include <splot.h>
main()
{
text(2.63,23,"The default position for the next line");
/* change to complex font for next line */
set(FONT,COMPLEX);
text("right below the previous line");
set(FONT,SIMPLEX);
text("There is a complete set of Greek characters");
text("!abcdefghijklmnopqrstuvxyz!");
set(FONT,COMPLEX);
text("!ABCDEFGHIJKLMNOPQRSTUVWXYZ!");
set(FONT,SIMPLEX);
set(LINECOLOUR,GREEN);
/* optinal change of script scale and position */
set(SCRIPTSCALE,1);
set(SCRIPTSHIFT,1);
text("Here are ^super^ and _sub_ scripts");
set(LINECOLOUR,RED);
text("and #Italics# in different colours");
set(LINECOLOUR,BLACK);
text("Letters can be large, small, tall, short");
text("fat, thin, vertical and angled.");
set(FONTMULT,2);
text(2.94,9.56,"Large");
set(FONTMULT,0.30);
text(8.90,9.71,"small");
set(FONTWIDTH,1.0);
set(FONTASPECT,3);
text(13.10,9.71,"Tall");
set(FONTASPECT,0.5);
text(17.05,9.71,"Short");
set(FONTASPECT,2);
set(LINEWIDTH,0.01);
text(2.94,7.29,"Thin");
set(LINEWIDTH,0.2);
text(9.02,7.29,"Fat");
set(LINEWIDTH,0.05);
set(FONTDIR,90);
text(3.63,1.26,"Vertical");
set(FONTDIR,130);
text(11.28,1.44,"Angled");
}