]> granicus.if.org Git - libass/commitdiff
Hack: half-merge glyph border with outline to avoid ugly anti-aliasing
authorgreg <greg@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 5 Mar 2009 20:36:35 +0000 (20:36 +0000)
committergreg <greg@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 5 Mar 2009 20:36:35 +0000 (20:36 +0000)
in certain situations.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28816 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_bitmap.c

index e6d5e8d60e77e8312995fa13c3bf5f71a25bb26b..9fb1eab65e4e98e45f99faf1b32fd6643128bcec 100644 (file)
@@ -243,7 +243,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 : 0;
+                       o[x] = (c_o > c_g) ? c_o - (c_g/2) : 0;
                        s[x] = (c_o < 0xFF - c_g) ? c_o + c_g : 0xFF;
                }
                g += bm_g->w;