home *** CD-ROM | disk | FTP | other *** search
- '****************************************************************************
- ' FILLMOD.BAS
- '
- ' This sample program demonstrates fill modes, Opaque & Transparent.
- '****************************************************************************
- '$INCLUDE: 'PGL.BAS'
-
- dfile$="FILLMOD.PLT"
-
-
- ' **** UserFill main procedure ****
- '
- ' Open A Drawing File.
- '
- call pgInitDrw( dfile$, 2000, 2000, 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 )
-
- ' Set fill patterns using userfill patterns
- call pgSetFillMode( pgOPAQ )
- call pgSetFillStyle( pgFSLASH, 1 )
- call pgEllipse( 750, 500, 500, 300, pgOFILL )
- call pgSetFillStyle( pgFBKSLASH, 1 )
- call pgEllipse( 1250, 500, 500, 300, pgOFILL )
- call pgDrawTextXY( 1000, 900, "Opaque Fill Mode" )
-
- call pgSetFillMode( pgTRANS )
- call pgSetFillStyle( pgFSLASH, 1 )
- call pgEllipse( 750, 1500, 500, 300, pgOFILL )
- call pgSetFillStyle( pgFBKSLASH, 1 )
- call pgEllipse( 1250, 1500, 500, 300, pgOFILL )
- call pgDrawTextXY( 1000, 1900, "Transparent Fill Mode" )
-
- ' Close The Drawing File.
- call pgEndDrw
-
- exitpgm:
- end