// Hello.cc
// Gloobs example program
// 
// first Gloobs program -- simply draws a square in an X11 window
// 
// by Smylers
// 2000 Jan 10: original version
// 2000 Jan 17: improved comments


// include the Gloobs library:
#include <gloobs.h>


int main()
{
  // create an X11 Canvas object; this one will have a width of 300_pixels, a
  // height of 200_pixels, and the title "Hello":
  Gloobs::Canvas DemoPic(Gloobs::X11, 300, 200, "Hello");

  // set the canvas background to colour number 18, which happens to be a
  // pale blue:
  DemoPic.set_background(18);

  // set the pen (drawing colour) to number 19, red:
  DemoPic.pen(19);

  // draw a filled rectangle with the bottom-left corner at (100, 50) and the
  // top-right at (200, 150):
  DemoPic.filled_rectangle(100, 50, 200, 150);

  // wait for the user to press <Enter>
  DemoPic.pause();
  
  return 0;
}