Commit c8e0f0af authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix win32 text renderer.

parent c5cc4e52
......@@ -314,13 +314,18 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
#endif
if( !psz_string || !*psz_string ) return VLC_EGENERIC;
i_font_color = __MAX( __MIN( p_region_in->i_text_color, 0xFFFFFF ), 0 );
if( i_font_color == 0xFFFFFF ) i_font_color = p_sys->i_font_color;
i_font_alpha = __MAX( __MIN( p_region_in->i_text_alpha, 255 ), 0 );
if( !i_font_alpha ) i_font_alpha = 255 - p_sys->i_font_opacity;
i_font_size = __MAX( __MIN( p_region_in->i_text_size, 255 ), 0 );
if( p_region_in->p_style )
{
i_font_color = __MAX( __MIN( p_region_in->p_style->i_font_color, 0xFFFFFF ), 0 );
i_font_alpha = __MAX( __MIN( p_region_in->p_style->i_font_alpha, 255 ), 0 );
i_font_size = __MAX( __MIN( p_region_in->p_style->i_font_size, 255 ), 0 );
}
else
{
i_font_color = p_sys->i_font_color;
i_font_alpha = 255 - p_sys->i_font_opacity;
i_font_size = p_sys->i_default_fontsize;
}
SetFont( p_filter, i_font_size );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment