summaryrefslogtreecommitdiff
path: root/test/overlapping-dash-caps.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-08-02 15:37:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-08-02 15:38:49 +0100
commitd356deb18201dd8054cff158c95c6fd6f0f38dcd (patch)
tree8e93667b1ad294962a882d8f36f5606b1f5c09d0 /test/overlapping-dash-caps.c
parent3f2126f092d86d3a217fe256df682bb45ee6ab2a (diff)
downloadcairo-d356deb18201dd8054cff158c95c6fd6f0f38dcd.tar.gz
test: Add a second ring to overlapping-dash-caps
Demonstrate a second artefact when using SQUARE. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'test/overlapping-dash-caps.c')
-rw-r--r--test/overlapping-dash-caps.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/overlapping-dash-caps.c b/test/overlapping-dash-caps.c
index 0d06d117a..f7ba248c2 100644
--- a/test/overlapping-dash-caps.c
+++ b/test/overlapping-dash-caps.c
@@ -31,22 +31,31 @@
static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
- double dashes[] = {20, 10};
+ double dashes1[] = {20, 10};
+ double dashes2[] = {10, 1};
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_paint (cr);
- cairo_set_source_rgba (cr, 0, 0, 0, 0.5);
+ cairo_set_line_width (cr, 15);
+ cairo_set_dash (cr, dashes1, 2, 0);
cairo_new_sub_path (cr);
cairo_arc (cr, SIZE/2, SIZE/2, SIZE/2-10, 0, 2*M_PI);
- cairo_set_dash (cr, dashes, 2, 0);
+ cairo_set_source_rgba (cr, 1, 0, 0, 0.5);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
- cairo_set_line_width (cr, 15);
+ cairo_stroke (cr);
+ cairo_set_dash (cr, dashes2, 2, 0);
+ cairo_new_sub_path (cr);
+ cairo_arc (cr, SIZE/2, SIZE/2, SIZE/4-5, 0, 2*M_PI);
+
+ cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
+ cairo_set_source_rgba (cr, 0, 1, 0, 0.5);
cairo_stroke (cr);
+
return CAIRO_TEST_SUCCESS;
}