#include #include #include #include #define SIZEX 1024 #define SIZEY 768 #define COUNT 128 void main(int argc, char *argv[]) { cairo_surface_t *cs; cs=cairo_image_surface_create(CAIRO_FORMAT_ARGB32, SIZEX, SIZEY); cairo_t *c; c=cairo_create(cs); int i; for(i=0; i < COUNT; i++) { cairo_set_line_width(c, 2.0); cairo_move_to(c, rand()%SIZEX, rand()%SIZEY); int k; for (k=0; k < 512; k++) { cairo_line_to(c, rand()%SIZEX, rand()%SIZEY); } cairo_stroke(c); } cairo_destroy(c); cairo_surface_destroy(cs); }