summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2012-04-21 03:52:54 +0200
committerGrigori Goronzy <greg@blackbox>2012-04-21 03:52:54 +0200
commitf1d3d38dc81cc07b432d93bb2346f3b8c24c920a (patch)
tree74ce0739c906390d62c868550dbaaaafbe70d8a3 /libass/ass_render.c
parent2ba300123f7e6e5b9bbc69976ca4017993af694b (diff)
downloadlibass-f1d3d38dc81cc07b432d93bb2346f3b8c24c920a.tar.bz2
libass-f1d3d38dc81cc07b432d93bb2346f3b8c24c920a.tar.xz
Refactor and fix border generation
Make sure to update the border appropriately in the second pass, after parsing.
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index f89c930..98064e3 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -862,7 +862,8 @@ void reset_render_context(ASS_Renderer *render_priv, ASS_Style *style)
render_priv->state.italic = style->Italic;
update_font(render_priv);
- change_border(render_priv, -1., -1.);
+ calc_border(render_priv, style->Outline, style->Outline);
+ change_border(render_priv, render_priv->state.border_x, render_priv->state.border_y);
render_priv->state.scale_x = style->ScaleX;
render_priv->state.scale_y = style->ScaleY;
render_priv->state.hspacing = style->Spacing;
@@ -1142,6 +1143,7 @@ get_outline_glyph(ASS_Renderer *priv, GlyphInfo *info)
} else if ((info->border_x > 0 || info->border_y > 0)
&& double_to_d6(info->scale_x) && double_to_d6(info->scale_y)) {
+ change_border(priv, info->border_x, info->border_y);
outline_copy(priv->ftlibrary, v.outline, &v.border);
stroke_outline(priv, v.border,
double_to_d6(info->border_x * priv->border_scale),