[vlc-devel] commit: Fixed support for font color and opacity for html rendered text. ( Laurent Aimar )
git version control
git at videolan.org
Tue Sep 23 19:54:34 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Sep 23 19:49:43 2008 +0200| [e93b437d4f5b470e229cab95726a2addb6ef3782] | committer: Laurent Aimar
Fixed support for font color and opacity for html rendered text.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e93b437d4f5b470e229cab95726a2addb6ef3782
---
modules/misc/freetype.c | 1 -
modules/misc/quartztext.c | 1 -
modules/misc/text_renderer.h | 3 ++-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 0ea7f34..d63830d 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -274,7 +274,6 @@ struct filter_sys_t
#define UCHAR uint32_t
#define TR_DEFAULT_FONT FC_DEFAULT_FONT
-#define TR_DEFAULT_COLOR 0x00ffffff
#define TR_FONT_STYLE_PTR ft_style_t *
#include "text_renderer.h"
diff --git a/modules/misc/quartztext.c b/modules/misc/quartztext.c
index 147ed3a..e0c6cb4 100644
--- a/modules/misc/quartztext.c
+++ b/modules/misc/quartztext.c
@@ -156,7 +156,6 @@ struct filter_sys_t
#define UCHAR UniChar
#define TR_DEFAULT_FONT p_sys->psz_font_name
-#define TR_DEFAULT_COLOR p_sys->i_font_color
#define TR_FONT_STYLE_PTR ATSUStyle
#include "text_renderer.h"
diff --git a/modules/misc/text_renderer.h b/modules/misc/text_renderer.h
index fa5d098..d8835b0 100644
--- a/modules/misc/text_renderer.h
+++ b/modules/misc/text_renderer.h
@@ -547,7 +547,8 @@ static int ProcessNodes( filter_t *p_filter,
rv = PushFont( &p_fonts,
TR_DEFAULT_FONT,
p_sys->i_font_size,
- TR_DEFAULT_COLOR,
+ (p_sys->i_font_color & 0xffffff) |
+ (((255-p_sys->i_font_opacity) & 0xff) << 24),
0x00ffffff );
}
if( rv != VLC_SUCCESS )
More information about the vlc-devel
mailing list