diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-01-05 08:49:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-01-05 08:49:47 (GMT) |
commit | aacf8d739e27f7131d0a7322da993ba8158df5e6 (patch) | |
tree | b53ca9c943b91ed43676acd0f73612577ebae655 /generic/tkFont.h | |
parent | a580567464cda1d5a6116339acc707e451e7854e (diff) | |
download | tk-aacf8d739e27f7131d0a7322da993ba8158df5e6.zip tk-aacf8d739e27f7131d0a7322da993ba8158df5e6.tar.gz tk-aacf8d739e27f7131d0a7322da993ba8158df5e6.tar.bz2 |
Corrected rounding of coordinates when working with fonts. [Bug 2824916]
Diffstat (limited to 'generic/tkFont.h')
-rw-r--r-- | generic/tkFont.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tkFont.h b/generic/tkFont.h index 5a16d01..ebf5bca 100644 --- a/generic/tkFont.h +++ b/generic/tkFont.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFont.h,v 1.13 2008/11/05 23:29:58 nijtmans Exp $ + * RCS: @(#) $Id: tkFont.h,v 1.14 2010/01/05 08:49:49 dkf Exp $ */ #ifndef _TKFONT @@ -189,6 +189,12 @@ typedef struct TkXLFDAttributes { #define XLFD_NUMFIELDS 13 /* Number of fields in XLFD. */ /* + * Helper macro. How to correctly round a double to a short. + */ + +#define ROUND16(x) ((short) round(x)) + +/* * Low-level API exported by generic code to platform-specific code. */ |