]> git.sur5r.net Git - glabels/commitdiff
In clip_punchouts(), center hole correctly on business card CDs.
authorJim Evins <evins@snaught.com>
Mon, 1 Sep 2003 19:06:11 +0000 (19:06 +0000)
committerJim Evins <evins@snaught.com>
Mon, 1 Sep 2003 19:06:11 +0000 (19:06 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@290 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/print.c

index 9e96dccc158fefd49ec6eb92ac6e5bd4cdcae29e..ed3e8d887d110c85a7c23aee5ae8b039de56bb95 100644 (file)
@@ -1108,7 +1108,7 @@ static void
 clip_punchouts (PrintInfo *pi,
                glLabel   *label)
 {
-       gdouble r1, r2;
+       gdouble w, h, r2;
        gdouble waste;
        glTemplate *template;
 
@@ -1123,10 +1123,10 @@ clip_punchouts (PrintInfo *pi,
                break;
 
        case GL_TEMPLATE_STYLE_CD:
+               gl_label_get_size (label, &w, &h);
                waste = template->label.cd.waste;
-               r1    = template->label.cd.r1;
                r2    = template->label.cd.r2;
-               create_ellipse_path (pi->pc, r1, r1, r2-waste, r2-waste);
+               create_ellipse_path (pi->pc, w/2, h/2, r2-waste, r2-waste);
                gnome_print_setrgbcolor (pi->pc, 1.0, 1.0, 1.0);
                gnome_print_setopacity (pi->pc, 1.0);
                gnome_print_fill (pi->pc);