/* * Copyright © XXXXXXXXXX * * XXXXXXXXXXX * License * XXXXXXXXXXX * * Author: XXXXXXX */ #include "cairo-test.h" static cairo_test_status_t draw (cairo_t *cr, int width, int height) { /* First some background (with alpha=1 so that argb32 * doesn't need special reference images) * */ cairo_set_source_rgb (cr, 1, 1, 1); cairo_paint (cr); /* Actual content */ /* Two rectilinear rectangles that will actually intersect the stroke */ cairo_rectangle (cr, 10, 10, 80, 80); /* Can't use cairo_rectangle() here since the bug depends on the order of * the corners(??) and cairo_rectangle() uses "the other one". */ cairo_move_to (cr, 20, 20); cairo_line_to (cr, 20, 50); cairo_line_to (cr, 50, 50); cairo_line_to (cr, 50, 20); cairo_line_to (cr, 20, 20); /* This additional rectangle makes the whole clip non-rectilinear, but it * doesn't actually influence the result of the stroke. */ cairo_rectangle (cr, 31.5, 31.5, 1., 1.); cairo_clip (cr); cairo_rectangle (cr, 5.5, 30.5, 90, 5); cairo_set_line_width (cr, 1.); cairo_set_source_rgb (cr, 0, 0, 0); cairo_stroke (cr); return CAIRO_TEST_SUCCESS; } CAIRO_TEST (bug_78339, "TODO: Description", NULL, /* keywords */ NULL, /* requirements */ 100, 100, NULL, draw)