home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / basic / PGL.ZIP / PGLPS.ZIP / FILLPAT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-01-20  |  1.8 KB  |  75 lines

  1. { FILLPAT.PAS }
  2. { PGL - Turbo Pascal Test Program }
  3. { Fill pattern display test program }
  4.  
  5. program geom;
  6. {$R-,S-}
  7. uses Crt, PGL;
  8.  
  9. label
  10. ExitPgm;
  11.  
  12. type
  13.   fill = string[20];
  14.  
  15. const
  16.    fillstyle : array [0..11] of fill = ( 'EMPTY FILL',
  17.                            'SOLID FILL',
  18.                            'LINE FILL',
  19.                            'LTSLASH FILL',
  20.                            'SLASH FILL',
  21.                            'BKSLASH FILL',
  22.                            'LTBKSLASH FILL',
  23.                            'HATCH FILL',
  24.                            'XHATCH FILL',
  25.                            'INTERLEAVE FILL',
  26.                            'WIDEDOT FILL',
  27.                            'CLOSEDOT FILL' );
  28.  
  29. var
  30.    j, ierr, dx : integer;
  31.  
  32. { ****   FillPat main procedure   ****  }
  33. begin
  34.   pgInitDrw( 'FillPat.plt', 4000, 3000, ierr );
  35.   if  ierr <> 0 then
  36.     begin
  37.        Writeln('Error in pgInitDrw' ); 
  38.        goto ExitPgm;
  39.     end;
  40.  
  41.    pgSetTextStyle( pgTRIPLEX );
  42.    pgSetTextJustify( pgCENTER, pgTOP );
  43.    pgSetCharSpacing( 3 );
  44.    pgSetTextScaling( 2, 1, 2, 1 );
  45.    pgSetColor( 15 );
  46.  
  47.    FOR j :=0 TO 3 DO
  48.     BEGIN
  49.       dx := j * 1000;
  50.       pgSetFillStyle( j, 1 );
  51.       pgRectangle( 100+dx, 100, 900+dx, 900, pgOFILL );
  52.       pgDrawTextXY( 500+dx, 920, fillstyle[j] );
  53.     END;
  54.  
  55.    FOR j :=4 TO 7 DO
  56.     BEGIN
  57.       dx := (j-4) * 1000;
  58.       pgSetFillStyle( j, 1 );
  59.       pgRectangle( 100+dx, 1100, 900+dx, 1900, pgOFILL );
  60.       pgDrawTextXY( 500+dx, 1920, fillstyle[j] );
  61.      END;
  62.  
  63.    FOR j :=8 TO 11 DO
  64.     BEGIN
  65.       dx := (j-8) * 1000;
  66.       pgSetFillStyle( j, 1 );
  67.       pgRectangle( 100+dx, 2100, 900+dx, 2900, pgOFILL );
  68.       pgDrawTextXY( 500+dx, 2920, fillstyle[j] );
  69.     END;
  70.  
  71.    { Close The Drawing File. }
  72.    pgEndDrw ;
  73. ExitPgm:
  74. end.
  75.