]> git.sesse.net Git - vlc/commitdiff
Fixed support for font color and opacity for html rendered text.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 23 Sep 2008 17:49:43 +0000 (19:49 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 23 Sep 2008 17:50:31 +0000 (19:50 +0200)
modules/misc/freetype.c
modules/misc/quartztext.c
modules/misc/text_renderer.h

index 0ea7f3473a6469a29277837bb549c6e362b1af69..d63830dcf9eb6f934e323d1dfce28028c3e6a3a4 100644 (file)
@@ -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"
index 147ed3a432ea3552cda604cdea2acc2745fc6e4f..e0c6cb40e0f5d99369fcf4577ccffd87a5392408 100644 (file)
@@ -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"
index fa5d098e63911ed94a857378879a10a0954a7acc..d8835b053f579b268875c54a7adca5eafc3278b8 100644 (file)
@@ -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 )