changeset 20296:041a388f2182

Center of rotation depends on alignment.
author eugeni
date Wed, 18 Oct 2006 21:19:51 +0000
parents 49865cf70233
children b69c85b29cb5
files libass/ass_render.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_render.c	Wed Oct 18 21:11:29 2006 +0000
+++ b/libass/ass_render.c	Wed Oct 18 21:19:51 2006 +0000
@@ -1866,13 +1866,15 @@
 			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);
-			center.x += (str_bbox.xMax - str_bbox.xMin) / 2;
-			center.y += (str_bbox.yMax - str_bbox.yMin) / 2;
+			get_base_point(str_bbox, alignment, &bx, &by);
+			center.x += bx - str_bbox.xMin;
+			center.y += by - str_bbox.yMin;
 		}
 
 		for (i = 0; i < text_info.length; ++i) {