USING: accessors cairo cairo.ffi fry images images.memory kernel math.rectangles colors.constants ; IN: cairo-png : make-png-image ( dim quot -- image ) '[ &cairo_surface_destroy [ &cairo_destroy @ ] keep "hello.png" cairo_surface_write_to_png drop ] make-memory-bitmap BGRA >>component-order ubyte-components >>component-type ; inline : hello-cairo ( -- ) { 300 300 } [ { 100 100 } { 200 200 } fill-rect ] make-png-image drop ; MAIN: hello-cairo