next up previous contents index
Next: ViewportsPolymarkers, and Up: Example Programs Previous: Example Programs

Polylines and Fill Areas

This program demonstrates the use of polylines and fill area. The workstation chosen here is the Tektronix 4107 (or a compatible).

      PROGRAM   BOX
      INCLUDE  'GKS$GTSDEV'
      INCLUDE  'GKS$ENUM'
      INTEGER   errfil
      PARAMETER(errfil = 10)
      INTEGER   wkid
      PARAMETER(wkid   = 1)
      INTEGER   conid
      PARAMETER(conid  = 1)
      REAL      pxa(5), pya(5)
      INTEGER   asflst(1:13)
      DATA      pxa /3.0,3.0,7.0,7.0,3.0/
      DATA      pya /2.0,8.0,8.0,2.0,2.0/
      DATA      asflst /13 * gindiv/  ! set all ASFs
C
      CALL gopks(errfil, 0)           ! open gks (BUFA not used)
      CALL gopwk(wkid, conid, T4107)  ! open workstation
      CALL gsasf(asflst)              ! set attributes individually
      CALL gacwk(wkid)                ! activate workstation
      CALL gselnt(1)                  ! select normalization tran
      CALL gswn(1, 0.0,10.0,0.0,10.0) ! set window
C
      CALL gsln(gldash)               ! set line type
      CALL gsfais(ghatch)             ! set fill area style
      CALL gpl(5, pxa, pya)           ! draw polyline
      CALL gfa(5, pxa, pya)           ! draw fill area
C
      CALL gdawk(wkid)                ! deactivate workstation
      CALL gclwk(wkid)                ! close workstation
      CALL gclks                      ! close GKS
      END

Janne Saarela
Mon Apr 3 17:00:12 METDST 1995