Show a basic storage type to handle a simple RGB raster graphics image,
and some primitive associated functions.

If possible provide a function to allocate an uninitialised image,
given its width and height, and provide 3 additional functions:

   one to fill an image with a plain RGB color,
   one to set a given pixel with a color,
   one to get the color of a pixel.


(If there are specificities about the storage or the allocation, explain those.)

These functions are used as a base for the articles in the category raster graphics operations, 
and a basic output function to check the results
is available in the article write ppm file.




$ include "seed7_05.s7i";
  include "draw.s7i";
 
const proc: main is func
  local
    var PRIMITIVE_WINDOW: myPixmap is PRIMITIVE_WINDOW.value;
    var color: myColor is black;
  begin
    myPixmap := newPixmap(300, 200);
    clear(myPixmap, light_green);
    point(myPixmap, 20, 30, color(256, 512, 768));
    myColor := getPixelColor(myPixmap, 20, 30);
    writeln(myColor.redLight <& " " <& myColor.greenLight <& " " <& myColor.blueLight);
  end func;