[MPlayer-cvslog] r20302 - trunk/libass/ass_render.c
eugeni
subversion at mplayerhq.hu
Wed Oct 18 23:19:51 CEST 2006
Author: eugeni
Date: Wed Oct 18 23:19:51 2006
New Revision: 20302
Modified:
trunk/libass/ass_render.c
Log:
Center of rotation depends on alignment.
Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c (original)
+++ trunk/libass/ass_render.c Wed Oct 18 23:19:51 2006
@@ -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) {
More information about the MPlayer-cvslog
mailing list