From: Jim Evins Date: Mon, 1 Sep 2003 19:06:11 +0000 (+0000) Subject: In clip_punchouts(), center hole correctly on business card CDs. X-Git-Tag: glabels-2_3_0~599 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=71f5a916bf906c4b25c6ebfb3ee9bfe43e84bbe6;p=glabels 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 --- 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);