diff options
author | Grigori Goronzy <greg@blackbox> | 2011-08-29 20:58:14 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-08-29 20:59:29 +0200 |
commit | f58cf96d947cb465b745696fddb05ce6883ebc9a (patch) | |
tree | fe97cc1f5fd94f064f3cfc0169c4af7cc2f62643 | |
parent | a7ed3543dd282aaa2df68f394b6426f3a00d2e4a (diff) | |
download | libass-f58cf96d947cb465b745696fddb05ce6883ebc9a.tar.bz2 libass-f58cf96d947cb465b745696fddb05ce6883ebc9a.tar.xz |
Fix x coordinates with PAR correction and left border
This is a bit hacky, but I'm planning to rewrite positioning in a
much cleaner way. Addresses GC issue #27.
-rw-r--r-- | libass/ass_render.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index d719e09..603ec15 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -2129,7 +2129,8 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event, } // convert glyphs to bitmaps - device_x *= render_priv->font_scale_x; + int left = render_priv->settings.left_margin; + device_x = (device_x - left) * render_priv->font_scale_x + left; for (i = 0; i < text_info->length; ++i) { GlyphInfo *info = glyphs + i; while (info) { |