fix linux extent getting screwups

Originally committed to SVN as r889.
This commit is contained in:
David Lamparter 2007-01-24 02:35:09 +00:00
parent 3c46ab72ac
commit 4247fa0ceb
2 changed files with 6 additions and 2 deletions

View file

@ -147,14 +147,16 @@ namespace Automation4 {
for (unsigned int i = 0; i < text.length(); i++) {
int a, b, c, d;
thedc.GetTextExtent(text[i], &a, &b, &c, &d);
width += a + >spacing;
width += a + spacing;
height = b > height ? b : height;
descent = c > descent ? c : descent;
extlead= d > extlead ? d : extlead;
}
} else {
// If the inter-character spacing should be zero, kerning info can (and must) be used, so calculate everything in one go
thedc.GetTextExtent(text, &width, &height, &descent, &extlead);
long lwidth, lheight, ldescent, lextlead;
thedc.GetTextExtent(text, &lwidth, &lheight, &ldescent, &lextlead);
width = lwidth; height = lheight; descent = ldescent; extlead = lextlead;
}
#endif

View file

@ -15,6 +15,8 @@
#include <inttypes.h>
#endif
#include <stdwx.h>
typedef int64_t __int64;
typedef uint64_t __uint64;
#define abs64 llabs