aboutsummaryrefslogtreecommitdiffhomepage
path: root/libass
diff options
context:
space:
mode:
authorGravatar eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-18 21:19:51 +0000
committerGravatar eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-18 21:19:51 +0000
commit7abe5a4ef864af8ec4550b2abcd4d4a992bb0848 (patch)
tree1d466f630db282e19b605e3ea4985cbffcd30895 /libass
parent2d3ad598548f688b9df03bc19b03ca3f12e3c8d7 (diff)
Center of rotation depends on alignment.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20302 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 447d905115..364bb1ea9a 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1866,13 +1866,15 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
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) {