#INCLUDE "rastergraphics.module"
#INCLUDE "rasterio.module"

PROC main ()
  INITIAL RASTER r IS MOBILE [200][200]INT:
  SEQ
    fill.rectangle (0, 0, 200, 200, COLOUR.GREEN, r)
    draw.circle (100, 100, 50, COLOUR.RED, r)
    draw.arc (50, 50, 50, 90 * ANGLE.DEGREE, 150 * ANGLE.DEGREE, COLOUR.BLUE, r)
    SEQ i = 0 FOR SIZE r
      SEQ
        r[i][100] := hsv.to.rgb ((REAL32 ROUND i) / (REAL32 ROUND (SIZE r)), 1.0, 1.0)
        r[i][105] := desaturate.colour (r[i][100], #20)
    write.raster ("test.ppm", r)
:
