diff options
author | Grigori Goronzy <greg@blackbox> | 2009-07-19 05:44:06 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-07-19 15:56:11 +0200 |
commit | 7690af4af50fda163ed724e8d0f3ce5d9a9ec552 (patch) | |
tree | 2e47f778604df717465d33e730abcca62c2c2ba0 /libass | |
parent | caabbe31879addc5c64737578e1803d3f193ac98 (diff) | |
download | libass-7690af4af50fda163ed724e8d0f3ce5d9a9ec552.tar.bz2 libass-7690af4af50fda163ed724e8d0f3ce5d9a9ec552.tar.xz |
Fix vertical centering (VALIGN_CENTER)
Match VSFilter behavior when centering non-positioned events
vertically. Previously, libass put the event on top of the vertical
center while VSFilter centered the event evenly. Adjust the centering
to behave like VSFilter.
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index e79c6b8..5caf8eb 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -2974,7 +2974,7 @@ ass_render_event(ass_renderer_t *render_priv, ass_event_t *event, } else if (valign == VALIGN_CENTER) { // midtitle double scr_y = y2scr(render_priv, render_priv->track->PlayResY / 2.0); - device_y = scr_y - (bbox.yMax - bbox.yMin) / 2.0; + device_y = scr_y - (bbox.yMax + bbox.yMin) / 2.0; } else { // subtitle double scr_y; if (valign != VALIGN_SUB) |