From: eugeni Date: Thu, 19 Oct 2006 18:08:44 +0000 (+0000) Subject: Fix center of rotation calculation. It was overly complex and X-Git-Tag: 0.9.7~415 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9778a645df94c5e77cf9afa657f2e3214ca9ad6a;p=libass Fix center of rotation calculation. It was overly complex and incorrect for right- and center-aligned text. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20308 b3059339-0415-0410-9bf9-f77b7e298cf2 --- diff --git a/libass/ass_render.c b/libass/ass_render.c index 364bb1e..a62071e 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1865,16 +1865,10 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images) 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) {