From 71f5a916bf906c4b25c6ebfb3ee9bfe43e84bbe6 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Mon, 1 Sep 2003 19:06:11 +0000 Subject: [PATCH] In clip_punchouts(), center hole correctly on business card CDs. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@290 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glabels2/src/print.c b/glabels2/src/print.c index 9e96dccc..ed3e8d88 100644 --- a/glabels2/src/print.c +++ b/glabels2/src/print.c @@ -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); -- 2.39.5