summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvText.c
diff options
context:
space:
mode:
authorpspjuth <pspjuth@noemail.net>2002-05-26 09:09:18 (GMT)
committerpspjuth <pspjuth@noemail.net>2002-05-26 09:09:18 (GMT)
commit13702177bf01f884696673c55edaf55e717f9359 (patch)
tree66f7facb5b9930d826652d49df0c5c11b2f5edd0 /generic/tkCanvText.c
parent988f2391a48376e23d4f50e455a119682ecefe9c (diff)
downloadtk-13702177bf01f884696673c55edaf55e717f9359.zip
tk-13702177bf01f884696673c55edaf55e717f9359.tar.gz
tk-13702177bf01f884696673c55edaf55e717f9359.tar.bz2
Negative coordinates were rounded badly causing a 1 pixel
displacement. [Bug #556526] FossilOrigin-Name: b0bf63ff21d0842b6fcc47905d34c0fc6d5e3e47
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r--generic/tkCanvText.c6
1 files changed, 3 insertions, 3 deletions
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 <stdio.h>
@@ -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: