]> granicus.if.org Git - graphviz/commitdiff
try using rounded joins in both cairo and quartz, for all line-joins
authorellson <devnull@localhost>
Thu, 28 Apr 2011 00:11:11 +0000 (00:11 +0000)
committerellson <devnull@localhost>
Thu, 28 Apr 2011 00:11:11 +0000 (00:11 +0000)
plugin/pango/gvrender_pango.c
plugin/quartz/gvrender_quartz.c

index c35b0978145042eb71a389061cdd9e307120cd5a..c3630d5711bd73fad19e914acafb8a8b747366bd 100644 (file)
@@ -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
index 0ed377dea6cd2d8b4d21bf0b1935995d02ad72e8..2491e29b68e65766966d5888f03758994c582a33 100644 (file)
@@ -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);