home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / EXAMPLES / CH18EX05.PRO < prev    next >
Encoding:
Text File  |  1990-03-26  |  1.6 KB  |  53 lines

  1. /*
  2.    Copyright (c) 1986, 90 by Prolog Development Center
  3. */
  4. constants
  5. % To access your BGI drivers and fonts bgi_path may need to equal "..\\BGI".
  6.    bgi_path = ""
  7.  
  8. % To access the GRAPDECL.PRO file you may need to add a path: 
  9. % include "..\\programs\\GRAPDECL.PRO" 
  10. include "GRAPDECL.PRO" 
  11.  
  12. goal
  13.    initgraph(detect,0,GraphDriver,GraphMode,bgi_path),
  14.    Title = "Font Example",
  15.    setTextJustify(center_Text,center_Text),
  16.    setUserCharSize(1,1,1,1),
  17.    setTextStyle(triplex_Font,horiz_Dir, user_Char_Size),
  18.    textWidth(Title,Width), textHeight(Title,Hight),
  19.    setUserCharSize(200,Width,100,Hight),
  20.    setTextStyle(triplex_Font,horiz_Dir, user_Char_Size),
  21.    rectangle(0,0,200,100),
  22.    outtextxy(100,48,Title),
  23.  
  24.    setUserCharSize(300,Width,100,Hight),
  25.    setTextStyle(gothic_Font,horiz_Dir, user_Char_Size),
  26.    rectangle(220,0,520,100),
  27.    outtextxy(370,48,Title),
  28.  
  29.    /*  Vertical Sans-Serif Font */
  30.    setUserCharSize(200,Width,150,Hight),
  31.    setTextStyle(sans_Serif_Font,vert_Dir, user_Char_Size),
  32.    rectangle(100,110,240,300),
  33.    outtextxy(150,200,Title),
  34.  
  35.    setTextJustify(left_Text,center_Text),
  36.    setTextStyle(small_Font,horiz_Dir, 1),
  37.    outtextxy(380,200,"Press Key to exit"),
  38.  
  39.    setTextJustify(right_Text,center_Text),
  40.    setTextStyle(small_Font,horiz_Dir, 4),
  41.    outtextxy(380,208,"Press Key to exit"),
  42.  
  43.    setTextJustify(left_Text,center_Text),
  44.    setTextStyle(small_Font,horiz_Dir, 6),
  45.    outtextxy(380,220,"Press Key to exit"),
  46.  
  47.    setTextJustify(center_Text,center_Text),
  48.    setTextStyle(default_Font,horiz_Dir, 2),
  49.    outtextxy(380,240,"Press Key to exit"),
  50.  
  51.    readchar(_),
  52.    closegraph.
  53.