+ p_dst_y = p_region->picture.Y_PIXELS;
+ p_dst_u = p_region->picture.U_PIXELS;
+ p_dst_v = p_region->picture.V_PIXELS;
+ p_dst_a = p_region->picture.A_PIXELS;
+ i_pitch = p_region->picture.A_PITCH;
+
+ /* Initialize the region pixels */
+ if( p_filter->p_sys->i_effect != EFFECT_BACKGROUND )
+ {
+ memset( p_dst_y, 0x00, i_pitch * p_region->fmt.i_height );
+ memset( p_dst_u, 0x80, i_pitch * p_region->fmt.i_height );
+ memset( p_dst_v, 0x80, i_pitch * p_region->fmt.i_height );
+ memset( p_dst_a, 0, i_pitch * p_region->fmt.i_height );
+ }
+ else
+ {
+ memset( p_dst_y, 0x0, i_pitch * p_region->fmt.i_height );
+ memset( p_dst_u, 0x80, i_pitch * p_region->fmt.i_height );
+ memset( p_dst_v, 0x80, i_pitch * p_region->fmt.i_height );
+ memset( p_dst_a, 0x80, i_pitch * p_region->fmt.i_height );
+ }
+ if( p_filter->p_sys->i_effect == EFFECT_OUTLINE ||
+ p_filter->p_sys->i_effect == EFFECT_OUTLINE_FAT )
+ {
+ DrawBlack( p_line, i_width, p_region, 0, 0);
+ DrawBlack( p_line, i_width, p_region, -1, 0);
+ DrawBlack( p_line, i_width, p_region, 0, -1);
+ DrawBlack( p_line, i_width, p_region, 1, 0);
+ DrawBlack( p_line, i_width, p_region, 0, 1);
+ }
+
+ if( p_filter->p_sys->i_effect == EFFECT_OUTLINE_FAT )
+ {
+ DrawBlack( p_line, i_width, p_region, -1, -1);
+ DrawBlack( p_line, i_width, p_region, -1, 1);
+ DrawBlack( p_line, i_width, p_region, 1, -1);
+ DrawBlack( p_line, i_width, p_region, 1, 1);
+
+ DrawBlack( p_line, i_width, p_region, -2, 0);
+ DrawBlack( p_line, i_width, p_region, 0, -2);
+ DrawBlack( p_line, i_width, p_region, 2, 0);
+ DrawBlack( p_line, i_width, p_region, 0, 2);
+
+ DrawBlack( p_line, i_width, p_region, -2, -2);
+ DrawBlack( p_line, i_width, p_region, -2, 2);
+ DrawBlack( p_line, i_width, p_region, 2, -2);
+ DrawBlack( p_line, i_width, p_region, 2, 2);
+
+ DrawBlack( p_line, i_width, p_region, -3, 0);
+ DrawBlack( p_line, i_width, p_region, 0, -3);
+ DrawBlack( p_line, i_width, p_region, 3, 0);
+ DrawBlack( p_line, i_width, p_region, 0, 3);
+ }
+
+ for( ; p_line != NULL; p_line = p_line->p_next )
+ {
+ int i_glyph_tmax = 0;
+ int i_bitmap_offset, i_offset, i_align_offset = 0;
+ for( i = 0; p_line->pp_glyphs[i] != NULL; i++ )
+ {
+ FT_BitmapGlyph p_glyph = p_line->pp_glyphs[ i ];
+ i_glyph_tmax = __MAX( i_glyph_tmax, p_glyph->top );
+ }
+
+ if( p_region->p_style && p_line->i_width < i_width )
+ {
+ if( p_region->p_style->i_text_align == SUBPICTURE_ALIGN_RIGHT )
+ {
+ i_align_offset = i_width - p_line->i_width;
+ }
+ else if( p_region->p_style->i_text_align != SUBPICTURE_ALIGN_LEFT )
+ {
+ i_align_offset = ( i_width - p_line->i_width ) / 2;
+ }
+ }
+
+ for( i = 0; p_line->pp_glyphs[i] != NULL; i++ )
+ {
+ FT_BitmapGlyph p_glyph = p_line->pp_glyphs[ i ];
+
+ i_offset = ( p_line->p_glyph_pos[ i ].y +
+ i_glyph_tmax - p_glyph->top + 3 ) *
+ i_pitch + p_line->p_glyph_pos[ i ].x + p_glyph->left + 3 +
+ i_align_offset;
+
+ for( y = 0, i_bitmap_offset = 0; y < p_glyph->bitmap.rows; y++ )