import std.math;
import Dislin;

void main (string[] args)
{ int i, n = 18, nl;
  float [18] xray;
  char [40] cbuf;
  char [4] cstr;

  for (i = 0; i < 18; i++)
    xray[i] = 1.f;

  setpag("da4p");
  metafl ("xwin");
  disini ();
  setvlt("small");
  hwfont ();
  pagera ();

  axspos (250, 2700);
  axslen (1600, 2200);
  titlin ("Shading Patterns (PIEGRF)", 3);
  height (50);

  legini (cast (char *) cbuf, 18, 2);

  for (i = 0; i < n; i++)
  { nl = intcha (i, cast (char *) cstr);
    leglin (cast (char *) cbuf, cast (char *) cstr, i + 1);
  }

  chnpie ("both");
  labels ("none", "pie");
  piegrf (cast (char *) cbuf, 1, cast (float *) xray, n);
  title ();
  disfin ();
}
