summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2012-12-16 19:02:32 +0200
committerOleg Oshmyan <chortos@inbox.lv>2012-12-28 18:59:06 +0200
commitfb1109b4bdec040dab5cdb00a342557b977e9c12 (patch)
tree3d045fd10cca57a733e9fd3fa3c4b2f34389745f /libass/ass_render.c
parent62275969552280956d6555f89b9a46427868d6ac (diff)
downloadlibass-fb1109b4bdec040dab5cdb00a342557b977e9c12.tar.bz2
libass-fb1109b4bdec040dab5cdb00a342557b977e9c12.tar.xz
Properly render opaque box shadows even when there is no border
Even if the border size is zero, the shadow is supposed to be a copy of a hypothetical border: when border_style is 1, this coincides with the borderless glyph, but when border_style is 3, the shadow must be an opaque box. Opaque box borders are now generated regardless of border size being non-zero, and outline_to_bitmap3 gets a new flag indicating whether it should discard the border (after generating a shadow from it).
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index a596ec4..a0971f2 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1125,8 +1125,7 @@ get_outline_glyph(ASS_Renderer *priv, GlyphInfo *info)
FT_Outline_Get_CBox(v.outline, &v.bbox_scaled);
- if (info->border_style == 3 &&
- (info->border_x > 0 || info->border_y > 0)) {
+ if (info->border_style == 3) {
FT_Vector advance;
v.border = calloc(1, sizeof(FT_Outline));
@@ -1311,7 +1310,8 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info)
&hash_val.bm_s, info->be,
info->blur * render_priv->border_scale,
key->shadow_offset,
- info->border_style);
+ info->border_style,
+ info->border_x || info->border_y);
if (error)
info->symbol = 0;