#INCLUDE "dislin.bi"

DIM AS INTEGER<32> ix(3) = {0, 300, 300,   0}
DIM AS INTEGER<32> iy(3) = {0,   0, 400, 400}
DIM AS INTEGER<32> ixp(3) = {0, 0, 0, 0}
DIM AS INTEGER<32> iyp(3) = {0, 0, 0, 0}
DIM AS STRING ctit = "Shading patterns (AREAF)"
DIM AS INTEGER i, j, k, ii, nl, nx0, ny0, iclr, nx, ny
DIM AS SINGLE v

Dislin.metafl ("cons")
Dislin.scrmod ("revers")
Dislin.disini ()
Dislin.setvlt ("small")
Dislin.pagera ()
Dislin.complx ()

Dislin.height (50)
nl = Dislin.nlmess (ctit)
Dislin.messag (ctit, (2970 - nl)/2, 200)

nx0 = 335
ny0 = 350

iclr = 0
FOR  i = 0 TO 2
  ny = ny0 + i * 600
  FOR j = 0 TO 5
    nx = nx0 + j * 400
    ii = i * 6 + j
    Dislin.shdpat (ii)
    iclr = iclr MOD 8
    iclr = iclr + 1
    Dislin.setclr (iclr)
    FOR k = 0 TO 3
      ixp(k) = ix(k) + nx
      iyp(k) = iy(k) + ny
    NEXT k

    Dislin.areaf (@ixp(0), @iyp(0), 4)
    nl = Dislin.nlnumb (ii, -1)
    nx += (300 - nl) / 2
    Dislin.color ("foreground")
    v = ii
    Dislin.number (v, -1, nx, ny + 460) 
  NEXT j
NEXT i
Dislin.disfin ()
END
