From: ellson Date: Mon, 5 Nov 2007 00:42:59 +0000 (+0000) Subject: add a clip region X-Git-Tag: LAST_LIBGRAPH~32^2~5085 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=687093c0d1a055b9180387d7d7d025d5cfeadae6;p=graphviz add a clip region --- diff --git a/plugin/pango/gvrender_pango.c b/plugin/pango/gvrender_pango.c index 3f1e1f6d8..c5b81853b 100644 --- a/plugin/pango/gvrender_pango.c +++ b/plugin/pango/gvrender_pango.c @@ -174,6 +174,13 @@ static void cairogen_begin_page(GVJ_t * job) cairo_scale(cr, job->scale.x, job->scale.y); cairo_rotate(cr, -job->rotation * M_PI / 180.); cairo_translate(cr, job->translation.x, -job->translation.y); + + 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); } static void cairogen_end_page(GVJ_t * job)