home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / basic / PGL.ZIP / PGLBS.ZIP / FILLMOD.BAS < prev    next >
Encoding:
BASIC Source File  |  1992-01-20  |  1.4 KB  |  47 lines

  1. '****************************************************************************
  2. '  FILLMOD.BAS
  3. '
  4. '  This sample program demonstrates fill modes, Opaque & Transparent.
  5. '****************************************************************************
  6. '$INCLUDE: 'PGL.BAS'
  7.  
  8.    dfile$="FILLMOD.PLT"
  9.  
  10.  
  11. ' ****   UserFill main procedure   ****  
  12. '    
  13. '    Open A Drawing File.
  14. '    
  15.    call pgInitDrw( dfile$, 2000, 2000, ierr% ) 
  16.    if ierr% <> 0 then
  17.       print "Error Opening Drawing File: " + dfile$ + " !"
  18.       goto exitpgm
  19.    endif
  20.    
  21.    call pgSetTextStyle( pgTRIPLEX ) 
  22.    call pgSetTextJustify( pgCENTER, pgTOP ) 
  23.    call pgSetCharSpacing( 3 ) 
  24.    call pgSetTextScaling( 2, 1, 2, 1 ) 
  25.    call pgSetColor( 15 ) 
  26.  
  27. ' Set fill patterns using userfill patterns
  28.    call pgSetFillMode( pgOPAQ ) 
  29.    call pgSetFillStyle( pgFSLASH, 1 ) 
  30.    call pgEllipse( 750, 500, 500, 300, pgOFILL ) 
  31.    call pgSetFillStyle( pgFBKSLASH, 1 ) 
  32.    call pgEllipse( 1250, 500, 500, 300, pgOFILL ) 
  33.    call pgDrawTextXY( 1000, 900, "Opaque Fill Mode" ) 
  34.  
  35.    call pgSetFillMode( pgTRANS ) 
  36.    call pgSetFillStyle( pgFSLASH, 1 ) 
  37.    call pgEllipse( 750, 1500, 500, 300, pgOFILL ) 
  38.    call pgSetFillStyle( pgFBKSLASH, 1 ) 
  39.    call pgEllipse( 1250, 1500, 500, 300, pgOFILL ) 
  40.    call pgDrawTextXY( 1000, 1900, "Transparent Fill Mode" ) 
  41.  
  42. ' Close The Drawing File. 
  43.    call pgEndDrw 
  44.  
  45. exitpgm:
  46. end
  47.