// 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]]]