Mercurial > MadButterfly
diff src/shape_text.c @ 289:13ce87b6dbf5
Fix bug of sh_text_t that do not update it-self after changes.
- It is wrong to compute bounding box.
- location of left-top corner is (text->d_x, text->d_y)
not (text->x, text->y).
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 31 Jan 2009 18:28:50 +0800 |
parents | 248a40d51473 |
children | 137a73822d48 |
line wrap: on
line diff
--- a/src/shape_text.c Sat Jan 31 17:35:27 2009 +0800 +++ b/src/shape_text.c Sat Jan 31 18:28:50 2009 +0800 @@ -117,8 +117,8 @@ * We add 5 pixels in get right bbox. But, it is unreasonable. */ - poses[0][0] = x + extents.x - shw; - poses[0][1] = y + extents.y - shw; + poses[0][0] = text->d_x + extents.x - shw; + poses[0][1] = text->d_y + extents.y - shw; poses[1][0] = poses[0][0] + extents.width + shape->stroke_width; poses[1][1] = poses[0][1] + extents.height + shape->stroke_width; geo_from_positions(shape->geo, 2, poses);