summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvText.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2008-10-05 11:34:45 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2008-10-05 11:34:45 (GMT)
commit7948114a00cbb067d9fd922efbce1010bec9813e (patch)
tree3902ed875b423c3eb9023c8bdd524105846cc013 /generic/tkCanvText.c
parent125c9fa123dd9ac104d0e3c4cf0908060f39b0be (diff)
downloadtk-7948114a00cbb067d9fd922efbce1010bec9813e.zip
tk-7948114a00cbb067d9fd922efbce1010bec9813e.tar.gz
tk-7948114a00cbb067d9fd922efbce1010bec9813e.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;