#include "cairo.h" int main() { cairo_surface_t *surf = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 400, 400); cairo_t *cr = cairo_create (surf); double dashes[2] = {8,2}; cairo_move_to (cr, 1, 1); cairo_line_to (cr, 393, 393); cairo_line_to (cr, 393, 393); cairo_line_to (cr, 1, 1); cairo_close_path (cr); cairo_set_line_width (cr, 2); cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); cairo_set_line_join (cr, CAIRO_LINE_JOIN_MITER); cairo_set_miter_limit (cr, 10); cairo_set_dash (cr, dashes, 2, 9); cairo_stroke (cr); return 0; }