From c1077f545ca0a9bfe7a655e752344dfa91a2f819 Mon Sep 17 00:00:00 2001 From: "peter.spjuth@gmail.com" Date: Sun, 26 May 2002 09:09:19 +0000 Subject: Negative coordinates were rounded badly causing a 1 pixel displacement. [Bug #556526] --- ChangeLog | 6 ++++++ generic/tkCanvText.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2d0193..2fa9071 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-05-26 Peter Spjuth + + * generic/tkCanvText.c (ComputeTextBbox): Negative + coordinates were rounded badly causing a 1 pixel + displacement. [Bug #556526] + 2002-05-24 Mo DeJong * mac/tkMacWm.c (Tk_WmCmd): diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index 63ed827..5254431 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvText.c,v 1.12 2002/04/05 08:43:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvText.c,v 1.13 2002/05/26 09:09:19 pspjuth Exp $ */ #include @@ -635,8 +635,8 @@ ComputeTextBbox(canvas, textPtr) * of the bounding box for the text item. */ - leftX = (int) (textPtr->x + 0.5); - topY = (int) (textPtr->y + 0.5); + leftX = (int) floor(textPtr->x + 0.5); + topY = (int) floor(textPtr->y + 0.5); switch (textPtr->anchor) { case TK_ANCHOR_NW: case TK_ANCHOR_N: -- cgit v0.12