home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / das_buch / grafik / dispfont.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-04-18  |  1017 b   |  39 lines

  1. {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X-}
  2. {$M 16384,0,655360}
  3.  
  4. (*===================================================================*)
  5. (*                           DISPFONT.PAS                            *)
  6. (*             Copyright (C) 1993 te-wi Verlag, München              *)
  7. (*===================================================================*)
  8.  
  9. PROGRAM DisplayFontAttrs;
  10.  
  11. USES
  12.   Crt, Graph, GraphErg;
  13.  
  14. VAR
  15.   gd, gm,
  16.   i, x, y : INTEGER;
  17.   s       : STRING;
  18.  
  19. BEGIN
  20.   gd := InstallUserDriver('SVGA', NIL);
  21.   gm := 0;
  22.   InitGraph(gd, gm, '');
  23.   SetBkColor(blue);
  24.   SetTextStyle(TriplexFont, HorizDir, 5);
  25.   SetTextJustify(CenterText, BottomText);
  26.   SetFillStyle(SolidFill, Red);
  27.   y := GetMaxY DIV 7;
  28.   s := 'Schrift-Attribut-Demonstration';
  29.   x := GetMaxX DIV 2;
  30.   FOR i := 0 TO 6 DO
  31.   BEGIN
  32.     FontAttr := tFontAttr(i);
  33.     OutTextXY(x, y * i + y, s);
  34.   END;
  35.   ReadLn;
  36.   CloseGraph;
  37. END.
  38.  
  39. (*===================================================================*)