[MPlayer-cvslog] r20308 - trunk/libass/ass_render.c

eugeni subversion at mplayerhq.hu
Thu Oct 19 20:08:44 CEST 2006


Author: eugeni
Date: Thu Oct 19 20:08:44 2006
New Revision: 20308

Modified:
   trunk/libass/ass_render.c

Log:
Fix center of rotation calculation. It was overly complex and
incorrect for right- and center-aligned text.


Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	(original)
+++ trunk/libass/ass_render.c	Thu Oct 19 20:08:44 2006
@@ -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) {



More information about the MPlayer-cvslog mailing list