diff options
author | Grigori Goronzy <greg@blackbox> | 2009-09-01 02:39:51 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-09-01 02:39:51 +0200 |
commit | e4e0ac252792981699532c4076569946c9719999 (patch) | |
tree | 2208147434af393fec23d62d2ce5f6bce27b82d2 /libass/ass_bitmap.c | |
parent | 8407e392667a2f37eaca4fabfcf6bd7ca42aaed5 (diff) | |
download | libass-e4e0ac252792981699532c4076569946c9719999.tar.bz2 libass-e4e0ac252792981699532c4076569946c9719999.tar.xz |
opaque box: do not subtract glyph from border
Similar to VSFilter, do not subtract the glyph bitmap from the border
bitmap when BorderStyle 3 is used.
Diffstat (limited to 'libass/ass_bitmap.c')
-rw-r--r-- | libass/ass_bitmap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libass/ass_bitmap.c b/libass/ass_bitmap.c index e2018ce1..1ae2d7c3 100644 --- a/libass/ass_bitmap.c +++ b/libass/ass_bitmap.c @@ -475,7 +475,8 @@ static void be_blur(unsigned char *buf, int w, int h) int glyph_to_bitmap(ASS_Library *library, ASS_SynthPriv *priv_blur, FT_Glyph glyph, FT_Glyph outline_glyph, Bitmap **bm_g, Bitmap **bm_o, Bitmap **bm_s, - int be, double blur_radius, FT_Vector shadow_offset) + int be, double blur_radius, FT_Vector shadow_offset, + int border_style) { blur_radius *= 2; int bbord = be > 0 ? sqrt(2 * be) : 0; @@ -527,7 +528,9 @@ int glyph_to_bitmap(ASS_Library *library, ASS_SynthPriv *priv_blur, priv_blur->g_w); } - if (*bm_o) + if (*bm_o && border_style == 3) + *bm_s = copy_bitmap(*bm_o); + else if (*bm_o) *bm_s = fix_outline_and_shadow(*bm_g, *bm_o); else *bm_s = copy_bitmap(*bm_g); |