home *** CD-ROM | disk | FTP | other *** search
- #include <stdlib.h>
- #include <stdio.h>
- #include "pgl.h"
- char string[12][20] = { "EMPTY FILL",
- "SOLID FILL",
- "LINE FILL",
- "LTSLASH FILL",
- "SLASH FILL",
- "BKSLASH FILL",
- "LTBKSLASH FILL",
- "HATCH FILL",
- "XHATCH FILL",
- "INTERLEAVE FILL",
- "WIDEDOT FILL",
- "CLOSEDOT FILL" };
-
-
- main()
-
- {
- int err=0, j, dx;
- pgInitDrw( "fillpat.plt", 4000, 3000, &err );
- if( err != 0 )
- {
- printf( "ERROR IN INITDRW ROUTINE" );
- exit( 1 );
- }
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextJustify( pgCENTER, pgTOP );
- pgSetCharSpacing( 3 );
- pgSetTextScaling( 2, 1, 2, 1 );
- pgSetColor( 15 );
-
- for( j=0; j<4; j++ )
- {
- dx = j * 1000;
- pgSetFillStyle( j, 1 );
- pgRectangle( 100+dx, 100, 900+dx, 900, pgOFILL );
- pgDrawTextXY( 500+dx, 920, string[j] );
- }
-
- for( j=4; j<8; j++ )
- {
- dx = (j-4) * 1000;
- pgSetFillStyle( j, 1 );
- pgRectangle( 100+dx, 1100, 900+dx, 1900, pgOFILL );
- pgDrawTextXY( 500+dx, 1920, string[j] );
- }
-
- for( j=8; j<12; j++ )
- {
- dx = (j-8) * 1000;
- pgSetFillStyle( j, 1 );
- pgRectangle( 100+dx, 2100, 900+dx, 2900, pgOFILL );
- pgDrawTextXY( 500+dx, 2920, string[j] );
- }
- pgEndDrw();
- }