// Hello_PS.cc // Gloobs example program // // PostScript version of first Gloobs program -- creates a PS file, and draws a // square in it // // by Smylers // 2000 Jan 10: original version // 2000 Jan 17: improved comments // include the Gloobs library: #include int main() { // create a PS Canvas object; this one will be A5 landscape and have the // filename Hello.ps: Gloobs::Canvas DemoPic(Gloobs::PS, g2_A5, g2_PS_land, "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); // don't wait for the user to press , because this isn't an X11 // canvas: DemoPic.pause(); return 0; }