home *** CD-ROM | disk | FTP | other *** search
- { FILLPAT.PAS }
- { PGL - Turbo Pascal Test Program }
- { Fill pattern display test program }
-
- program geom;
- {$R-,S-}
- uses Crt, PGL;
-
- label
- ExitPgm;
-
- type
- fill = string[20];
-
- const
- fillstyle : array [0..11] of fill = ( 'EMPTY FILL',
- 'SOLID FILL',
- 'LINE FILL',
- 'LTSLASH FILL',
- 'SLASH FILL',
- 'BKSLASH FILL',
- 'LTBKSLASH FILL',
- 'HATCH FILL',
- 'XHATCH FILL',
- 'INTERLEAVE FILL',
- 'WIDEDOT FILL',
- 'CLOSEDOT FILL' );
-
- var
- j, ierr, dx : integer;
-
- { **** FillPat main procedure **** }
- begin
- pgInitDrw( 'FillPat.plt', 4000, 3000, ierr );
- if ierr <> 0 then
- begin
- Writeln('Error in pgInitDrw' );
- goto ExitPgm;
- end;
-
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextJustify( pgCENTER, pgTOP );
- pgSetCharSpacing( 3 );
- pgSetTextScaling( 2, 1, 2, 1 );
- pgSetColor( 15 );
-
- FOR j :=0 TO 3 DO
- BEGIN
- dx := j * 1000;
- pgSetFillStyle( j, 1 );
- pgRectangle( 100+dx, 100, 900+dx, 900, pgOFILL );
- pgDrawTextXY( 500+dx, 920, fillstyle[j] );
- END;
-
- FOR j :=4 TO 7 DO
- BEGIN
- dx := (j-4) * 1000;
- pgSetFillStyle( j, 1 );
- pgRectangle( 100+dx, 1100, 900+dx, 1900, pgOFILL );
- pgDrawTextXY( 500+dx, 1920, fillstyle[j] );
- END;
-
- FOR j :=8 TO 11 DO
- BEGIN
- dx := (j-8) * 1000;
- pgSetFillStyle( j, 1 );
- pgRectangle( 100+dx, 2100, 900+dx, 2900, pgOFILL );
- pgDrawTextXY( 500+dx, 2920, fillstyle[j] );
- END;
-
- { Close The Drawing File. }
- pgEndDrw ;
- ExitPgm:
- end.