From c54cf755ac3447389803ddbd3fb984d3d1343b43 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Tue, 22 Jul 2008 18:49:20 +0000 Subject: [PATCH] Fix "ugly fades" bug. The border colour was rendered behind the fill colour unless both primary and secondary alpha were non-zero. The \fad and \fade tags both set \alpha rather than \1a \2a \3a \4a, and \alpha is a wholly separate alpha value which wasn't considered at all in this case. Making it never draw the fill in border colour fixes this and doesn't seem to have any adverse effects. Originally committed to SVN as r2276. --- vsfilter/subtitles/RTS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vsfilter/subtitles/RTS.cpp b/vsfilter/subtitles/RTS.cpp index 5c5e8db58..63ab398a0 100644 --- a/vsfilter/subtitles/RTS.cpp +++ b/vsfilter/subtitles/RTS.cpp @@ -702,11 +702,11 @@ CRect CLine::PaintOutline(SubPicDesc& spd, CRect& clipRect, BYTE* pAlphaMask, CP if(w->m_style.borderStyle == 0) { - bbox |= w->Draw(spd, clipRect, pAlphaMask, x, y, sw, !w->m_style.alpha[0] && !w->m_style.alpha[1], true); + bbox |= w->Draw(spd, clipRect, pAlphaMask, x, y, sw, false, true); } else if(w->m_style.borderStyle == 1 && w->m_pOpaqueBox) { - bbox |= w->m_pOpaqueBox->Draw(spd, clipRect, pAlphaMask, x, y, sw, true/*!w->m_style.alpha[0] && !w->m_style.alpha[1]*/, false); + bbox |= w->m_pOpaqueBox->Draw(spd, clipRect, pAlphaMask, x, y, sw, true, false); } }