From 5b5626d94dc20420e76f407001e3e6eb33372e0c Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 28 Apr 2011 00:11:11 +0000 Subject: [PATCH] try using rounded joins in both cairo and quartz, for all line-joins --- plugin/pango/gvrender_pango.c | 4 +--- plugin/quartz/gvrender_quartz.c | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin/pango/gvrender_pango.c b/plugin/pango/gvrender_pango.c index c35b09781..c3630d571 100644 --- a/plugin/pango/gvrender_pango.c +++ b/plugin/pango/gvrender_pango.c @@ -164,6 +164,7 @@ static void cairogen_begin_page(GVJ_t * job) cairo_rectangle(cr, job->clip.LL.x, - job->clip.LL.y, job->clip.UR.x - job->clip.LL.x, - (job->clip.UR.y - job->clip.LL.y)); cairo_clip(cr); + cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); } static void cairogen_end_page(GVJ_t * job) @@ -292,9 +293,7 @@ cairogen_polygon(GVJ_t * job, pointf * A, int n, int filled) cairo_t *cr = (cairo_t *) job->context; int i; - cairo_save(cr); cairogen_set_penstyle(job, cr); - cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); cairo_move_to(cr, A[0].x, -A[0].y); for (i = 1; i < n; i++) @@ -306,7 +305,6 @@ cairogen_polygon(GVJ_t * job, pointf * A, int n, int filled) } cairogen_set_color(cr, &(obj->pencolor)); cairo_stroke(cr); - cairo_restore(cr); } static void diff --git a/plugin/quartz/gvrender_quartz.c b/plugin/quartz/gvrender_quartz.c index 0ed377dea..2491e29b6 100644 --- a/plugin/quartz/gvrender_quartz.c +++ b/plugin/quartz/gvrender_quartz.c @@ -212,6 +212,7 @@ static void quartzgen_begin_page(GVJ_t *job) CGContextBeginPage(context, &bounds); CGContextSaveGState(context); CGContextSetMiterLimit(context, 1.0); + CGContextSetLineJoin(context, kCGLineJoinRound); /* set up the context transformation */ CGContextScaleCTM(context, job->scale.x, job->scale.y); -- 2.40.0