Mercurial > mplayer.hg
changeset 20302:2f7c26c86574
Fix center of rotation calculation. It was overly complex and
incorrect for right- and center-aligned text.
author | eugeni |
---|---|
date | Thu, 19 Oct 2006 18:08:44 +0000 |
parents | c0c4bf41ce01 |
children | 21dd6cf54fff |
files | libass/ass_render.c |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libass/ass_render.c Thu Oct 19 16:13:35 2006 +0000 +++ b/libass/ass_render.c Thu Oct 19 18:08:44 2006 +0000 @@ -1865,16 +1865,10 @@ center.x = render_context.org_x; center.y = render_context.org_y; } else { - FT_BBox str_bbox; int bx, by; - - center.x = text_info.glyphs[0].pos.x + device_x; - center.y = text_info.glyphs[0].pos.y + device_y; - - compute_string_bbox(&text_info, &str_bbox); - get_base_point(str_bbox, alignment, &bx, &by); - center.x += bx - str_bbox.xMin; - center.y += by - str_bbox.yMin; + get_base_point(bbox, alignment, &bx, &by); + center.x = device_x + bx; + center.y = device_y + by; } for (i = 0; i < text_info.length; ++i) {