From c29868bc5e87ebd5e6531e2fc28261afafc183b5 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Wed, 15 Oct 2003 01:02:46 +0000 Subject: [PATCH] Applied patch #822935. This patch slightly increases the invalidated area during a redraw request, to account for anti-aliasing. This prevent small artifacts from being left around when text and barcode objects are dragged around the canvas. This patch also corrects an oversight in view-barcode.c when converting from gnome_canvas_hacktext to gl_canvas_hacktext. This patch was provided by Emmanuel Pacaud . git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@315 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/canvas-hacktext.c | 9 +++++++++ glabels2/src/view-barcode.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/glabels2/src/canvas-hacktext.c b/glabels2/src/canvas-hacktext.c index 8db1ef4c..0c3ba8d8 100644 --- a/glabels2/src/canvas-hacktext.c +++ b/glabels2/src/canvas-hacktext.c @@ -541,6 +541,15 @@ gl_canvas_hacktext_req_repaint (glCanvasHacktext *hacktext, if (gnome_pgl_bbox (hacktext->priv->pgl, &gbbox)) { ArtIRect ibox; art_drect_to_irect (&ibox, &gbbox); + + /* hack: bounding box seems to be underestimated. + * It may be doesn't take into account antialiasing*/ + + ibox.x0--; + ibox.y0--; + ibox.x1++; + ibox.y1++; + gnome_canvas_request_redraw (hacktext->item.canvas, ibox.x0, ibox.y0, ibox.x1, ibox.y1); if (bbox) art_irect_union (bbox, bbox, &ibox); } diff --git a/glabels2/src/view-barcode.c b/glabels2/src/view-barcode.c index 689a0d01..e2782c03 100644 --- a/glabels2/src/view-barcode.c +++ b/glabels2/src/view-barcode.c @@ -856,7 +856,7 @@ draw_barcode (glViewBarcode *view_barcode) y_offset = bchar->fsize - gnome_font_get_descender (font); item = gl_view_object_item_new (GL_VIEW_OBJECT(view_barcode), - gnome_canvas_hacktext_get_type (), + gl_canvas_hacktext_get_type (), "x", bchar->x, "y", bchar->y + y_offset, "glyphlist", glyphlist, -- 2.39.5