Commit 606c3980 authored by Antoine Cellerier's avatar Antoine Cellerier

Change the visible heigh/width only if they weren't set in the source text...

Change the visible heigh/width only if they weren't set in the source text subpicture. Else use the original values. Could someone with good knowledge of the freetype module (and maybe other text render modules ... if we have any) confirm that this change is ok?
parent e8740b8b
......@@ -408,6 +408,10 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
fmt.i_aspect = 0;
fmt.i_width = fmt.i_visible_width = i_width + 4;
fmt.i_height = fmt.i_visible_height = i_height + 4;
if( p_region->fmt.i_visible_width > 0 )
fmt.i_visible_width = p_region->fmt.i_visible_width;
if( p_region->fmt.i_visible_height > 0 )
fmt.i_visible_height = p_region->fmt.i_visible_height;
fmt.i_x_offset = fmt.i_y_offset = 0;
p_region_tmp = spu_CreateRegion( p_filter, &fmt );
if( !p_region_tmp )
......@@ -679,6 +683,10 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
fmt.i_aspect = 0;
fmt.i_width = fmt.i_visible_width = i_width + 6;
fmt.i_height = fmt.i_visible_height = i_height + 6;
if( p_region->fmt.i_visible_width > 0 )
fmt.i_visible_width = p_region->fmt.i_visible_width;
if( p_region->fmt.i_visible_height > 0 )
fmt.i_visible_height = p_region->fmt.i_visible_height;
fmt.i_x_offset = fmt.i_y_offset = 0;
p_region_tmp = spu_CreateRegion( p_filter, &fmt );
if( !p_region_tmp )
......
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