summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvText.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-05 11:34:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-05 11:34:45 (GMT)
commit199d4675fda94dffe00bafa804ea9f5e38f0891b (patch)
tree3902ed875b423c3eb9023c8bdd524105846cc013 /generic/tkCanvText.c
parent8a44d010fe0fe2f1b6787480556519e67e5458f2 (diff)
downloadtk-199d4675fda94dffe00bafa804ea9f5e38f0891b.zip
tk-199d4675fda94dffe00bafa804ea9f5e38f0891b.tar.gz
tk-199d4675fda94dffe00bafa804ea9f5e38f0891b.tar.bz2
Backport of fix for [Bug 2112563]
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r--generic/tkCanvText.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 1dfdc7f..40ca817 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.26 2007/12/13 15:24:13 dgp Exp $
+ * RCS: @(#) $Id: tkCanvText.c,v 1.26.2.1 2008/10/05 11:34:46 dkf Exp $
*/
#include <stdio.h>
@@ -1501,9 +1501,14 @@ TextToPostscript(
}
Tk_GetFontMetrics(textPtr->tkfont, &fm);
- sprintf(buffer, "] %d %g %g %s %s DrawText\n",
- fm.linespace, x / -2.0, y / 2.0, justify,
- ((stipple == None) ? "false" : "true"));
+ sprintf(buffer, "] %d ", fm.linespace);
+ Tcl_AppendResult(interp, buffer, NULL);
+ Tcl_PrintDouble(NULL, x / -2.0, buffer);
+ Tcl_AppendResult(interp, buffer, NULL);
+ Tcl_PrintDouble(NULL, y / 2.0, buffer);
+ Tcl_AppendResult(interp, " ", buffer, NULL);
+ sprintf(buffer, " %s %s DrawText\n",
+ justify, ((stipple == None) ? "false" : "true"));
Tcl_AppendResult(interp, buffer, NULL);
return TCL_OK;