USING: accessors cairo cairo.ffi fry images images.memory kernel math.rectangles ; IN: cairo-png : make-png-image ( dim quot -- image ) '[ dup "hello.png" cairo_surface_write_to_png drop &cairo_surface_destroy &cairo_destroy @ ] 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