]> granicus.if.org Git - graphviz/commitdiff
add a clip region
authorellson <devnull@localhost>
Mon, 5 Nov 2007 00:42:59 +0000 (00:42 +0000)
committerellson <devnull@localhost>
Mon, 5 Nov 2007 00:42:59 +0000 (00:42 +0000)
plugin/pango/gvrender_pango.c

index 3f1e1f6d852cebbb1c4a8e1b9296580d14f1bc2e..c5b81853b33ffe2f2e554afdb60f4496ef818c3a 100644 (file)
@@ -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)