git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
086884e
)
fixed a bug in the text bounding box calculation.
author
kramm
<kramm>
Sun, 19 Jun 2005 10:57:11 +0000
(10:57 +0000)
committer
kramm
<kramm>
Sun, 19 Jun 2005 10:57:11 +0000
(10:57 +0000)
src/swfbbox.c
patch
|
blob
|
history
diff --git
a/src/swfbbox.c
b/src/swfbbox.c
index
d0e87cb
..
b3b8a77
100644
(file)
--- a/
src/swfbbox.c
+++ b/
src/swfbbox.c
@@
-241,18
+241,22
@@
static void textcallback(void*self, int*chars, int*xpos, int nr, int fontid, int
int ch;
SRECT newglyphbbox, glyphbbox = font->layout->bounds[chars[t]];
MATRIX m = bounds->m;
int ch;
SRECT newglyphbbox, glyphbbox = font->layout->bounds[chars[t]];
MATRIX m = bounds->m;
-
+ SPOINT p;
+
if(chars[t] < font->numchars && font->glyph2ascii) {
ch = font->glyph2ascii[chars[t]];
}
if(chars[t] < font->numchars && font->glyph2ascii) {
ch = font->glyph2ascii[chars[t]];
}
+ p.x = x; p.y = y;
+ p = swf_TurnPoint(p, &m);
+
m.sx = (m.sx * fontsize) / 1024;
m.sy = (m.sy * fontsize) / 1024;
m.r0 = (m.r0 * fontsize) / 1024;
m.r1 = (m.r1 * fontsize) / 1024;
m.sx = (m.sx * fontsize) / 1024;
m.sy = (m.sy * fontsize) / 1024;
m.r0 = (m.r0 * fontsize) / 1024;
m.r1 = (m.r1 * fontsize) / 1024;
- m.tx += x;
- m.ty += y;
+ m.tx += p.x;
+ m.ty += p.y;
newglyphbbox = swf_TurnRect(glyphbbox, &m);
if(ch<32) ch='?';
newglyphbbox = swf_TurnRect(glyphbbox, &m);
if(ch<32) ch='?';