summaryrefslogtreecommitdiffstats
path: root/libass/ass_bitmap.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-13 16:35:15 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-13 16:35:15 +0000
commit0699a8640056535901a9aabec58e909ce7ae54ef (patch)
tree53d744ca48cb42bd3d4008a7d02c4d10d744c390 /libass/ass_bitmap.c
parentcb4d2cf57e5e5aabe6c947cfcb410c6ba95b7a81 (diff)
downloadlibass-0699a8640056535901a9aabec58e909ce7ae54ef.tar.bz2
libass-0699a8640056535901a9aabec58e909ce7ae54ef.tar.xz
Partial fix for semitransparent glyph outlines.
This fix removes semitransparent area (less then pixel width) between glyph and it's outline. Instead, it makes them overlap a little. It usually looks much better this way. Complete fix seems impossible with the current output format (single color alpha bitmaps). The right way is to blend both glyph and outline into one bitmap so that 2 pixels with 50% transparency produce a fully solid one. This requires RGBA bitmap output from libass. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20890 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_bitmap.c')
-rw-r--r--libass/ass_bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_bitmap.c b/libass/ass_bitmap.c
index 3076713..baadc55 100644
--- a/libass/ass_bitmap.c
+++ b/libass/ass_bitmap.c
@@ -219,7 +219,7 @@ static bitmap_t* fix_outline_and_shadow(bitmap_t* bm_g, bitmap_t* bm_o)
unsigned char c_g, c_o;
c_g = g[x];
c_o = o[x];
- o[x] = (c_o > c_g) ? c_o - c_g : 0;
+ o[x] = (c_o > c_g) ? c_o : 0;
s[x] = (c_o < 0xFF - c_g) ? c_o + c_g : 0xFF;
}
g += bm_g->w;