home *** CD-ROM | disk | FTP | other *** search
- '****************************************************************************
- ' LINEPAT.BAS
- '
- ' This sample program demonstrates the predefined linestyles.
- '****************************************************************************
- '$INCLUDE: 'PGL.BAS'
-
- dfile$="LINEPAT.PLT"
- DIM linepatterns(8) AS STRING*25
-
- linepatterns(0) = "SOLID LINE"
- linepatterns(1) = "HUGE DASH LINE"
- linepatterns(2) = "LARGE DASH LINE"
- linepatterns(3) = "MEDIUM DASH LINE"
- linepatterns(4) = "SMALL DASH LINE"
- linepatterns(5) = "WIDE DOT LINE"
- linepatterns(6) = "CLOSE DOT LINE"
- linepatterns(7) = "DASH DOT LINE"
- linepatterns(8) = "CENTER LINE"
-
- ' **** LienPat 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( pgLEFT, pgBOTTOM )
- call pgSetCharSpacing( 3 )
- call pgSetTextScaling( 2, 1, 2, 1 )
- call pgSetColor( 1 )
-
- maxx% = pgGetMaxX%
-
- ' Set line styles and draw 'em.
- y% = 200
- FOR j% = 0 TO 8
- print linepatterns(j%)
- call pgSetLineStyle( j%, 10 )
- call pgSetLineWeight( 50 )
- call pgLine( 0, y%, maxx% / 2, y% )
- call pgDrawTextXY( maxx% / 2 + 100, y%, linepatterns(j%) )
- y% = y% + 200
- NEXT
-
- ' Close The Drawing File.
- call pgEndDrw
-
- exitpgm:
- end