home *** CD-ROM | disk | FTP | other *** search
- ****************************************************************************
- * USERFILL.PRG
- *
- * User Fill pattern demo program.
- ****************************************************************************
- *
- * Include PGL.PRG
- *
- SET PROCEDURE TO PGL
- DO PGLINIT
- *
- PUBLIC fillstyle[3], oldfill[3], userfill[3]
- PUBLIC j, ierr, dx, color, tmp
- **************************************************************************
- * - MAIN PROCEDURE
- **************************************************************************
- fillstyle[1]= 'FILL 1'
- fillstyle[2]= 'FILL 2'
- fillstyle[3]= 'FILL 3'
-
- userfill[1]=CHR(255)+CHR(128)+CHR(128)+CHR(128)+CHR(255)+CHR(8)+CHR(8)+CHR(8)
- userfill[2]=CHR(255)+CHR(136)+CHR(136)+CHR(136)+CHR(255)+CHR(8)+CHR(8)+CHR(8)
- userfill[3]=CHR(255)+CHR(8)+CHR(8)+CHR(8)+CHR(255)+CHR(8)+CHR(8)+CHR(8)
- oldfill[1]=space(8)
- oldfill[2]=space(8)
- oldfill[3]=space(8)
- tmp = space(8)
- *
- * Open A Drawing File
- *
- pgINIT( 'userfill.plt' , 4000, 3000, @ierr )
- if ierr <> 0
- ? "error opening drawing file!"
- return
- end if
-
- pgSTStyle( pgTRIPLEX )
- pgSTJust( pgCENTER, pgTOP )
- pgSCHARSP( 3 )
- pgSTScale( 2, 1, 2, 1 )
- pgSColor( 15 )
-
- for j = 1 to 3
- dx = (j-1) * 1000
- pgSFPat( userfill[j], 1 )
- pgRect( 100+dx, 100, 900+dx, 900, pgOFILL )
- pgDTXY( 500+dx, 920, fillstyle[j] )
- pgGFPat( @tmp, @color )
- oldfill[j]=tmp
- next
-
- for j = 1 to 3
- dx = (j-1) * 1000
- pgSFPat( oldfill[j], color )
- pgRect( 100+dx, 1100, 900+dx, 1900, pgOFILL )
- pgDTXY( 500+dx, 1920, fillstyle[j] )
- next
-
- *
- * Close The Drawing File.
- *
- pgEND()
- *
- * - END MAIN PROCEDURE
- *