home *** CD-ROM | disk | FTP | other *** search
- '****************************************************************************
- ' FILLPAT.BAS
- '
- ' This sample program demonstrates the predefined fill patterns.
- '****************************************************************************
- '$INCLUDE: 'PGL.BAS'
-
- dfile$="FILLPAT.PLT"
- DIM fillstyle(11) AS STRING*25
-
- fillstyle(0) = "EMPTY FILL"
- fillstyle(1) = "SOLID FILL"
- fillstyle(2) = "LINE FILL"
- fillstyle(3) = "LTSLASH FILL"
- fillstyle(4) = "SLASH FILL"
- fillstyle(5) = "BKSLASH FILL"
- fillstyle(6) = "LTBKSLASH FILL"
- fillstyle(7) = "HATCH FILL"
- fillstyle(8) = "XHATCH FILL"
- fillstyle(9) = "INTERLEAVE FILL"
- fillstyle(10) = "WIDEDOT FILL"
- fillstyle(11) = "CLOSEDOT FILL"
-
- ' **** FillPat main procedure ****
- '
- ' Open A Drawing File.
- '
- call pgInitDrw( dfile$, 4000, 3000, ierr% )
- if ierr% <> 0 then
- print "Error Opening Drawing File: " + dfile$ + " !"
- goto exitpgm
- endif
-
- call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextJustify( pgCENTER, pgTOP )
- call pgSetCharSpacing( 3 )
- call pgSetTextScaling( 2, 1, 2, 1 )
- call pgSetColor( 15 )
-
- FOR j% = 0 TO 3
- dx% = j% * 1000
- call pgSetFillStyle( j%, 1 )
- call pgRectangle( 100+dx%, 100, 900+dx%, 900, pgOFILL )
- call pgDrawTextXY( 500+dx%, 920, fillstyle$(j%) )
- NEXT
-
- FOR j% = 4 TO 7
- dx% = (j%-4) * 1000
- call pgSetFillStyle( j%, 1 )
- call pgRectangle( 100+dx%, 1100, 900+dx%, 1900, pgOFILL )
- call pgDrawTextXY( 500+dx%, 1920, fillstyle$(j%) )
- NEXT
-
- FOR j% = 8 TO 11
- dx% = (j%-8) * 1000
- call pgSetFillStyle( j%, 1 )
- call pgRectangle( 100+dx%, 2100, 900+dx%, 2900, pgOFILL )
- call pgDrawTextXY( 500+dx%, 2920, fillstyle$(j%) )
- NEXT
-
- ' Close The Drawing File.
- call pgEndDrw
-
- exitpgm:
- end