the output produced by Box To run this example you will need the following file(s): ./cairo_gradient.box. If the example requires more than one file, then you should put them into the same directory. You can then launch Box with box -l g ./cairo_gradient.box.
// One example taken from the samples page of the Cairo graphic library // (http://cairographics.org/samples/), rewritten in Box. include "g" pat1 = Gradient[Line[(0, 256), (0, 0)], color.white, color.black] pat2 = Gradient[Circles[(115.2, 153.6), 25.6; (102.4, 153.6), 128.0], color.white, color.black] w = Window[][ Poly[(0, 0), (256, 0), (256, 256), (0, 256), pat1] Circle[(128, 128), 76.8, pat2] ] w.Save["cairo_gradient.png", Window["rgb24", .Res[1]]]