- i_y_margin = p_vout->render.i_height / 15;
- i_x_margin = i_y_margin;
- i_width = p_vout->render.i_width / 20;
- i_height = i_width;
- i_x = p_vout->render.i_width - i_x_margin - i_width;
- i_y = i_y_margin;
-
- /* Create subpicture region and picture */
- CreatePicture( p_vout->p_spu, p_subpic, i_x, i_y, i_width, i_height );
-
- if( i_type == OSD_PAUSE_ICON )
- {
- int i_bar_width = i_width / 3;
- DrawRect( p_subpic, 0, 0, i_bar_width - 1, i_height -1, STYLE_FILLED );
- DrawRect( p_subpic, i_width - i_bar_width, 0,
- i_width - 1, i_height - 1, STYLE_FILLED );
- }
- else if( i_type == OSD_PLAY_ICON )
- {
- int i_mid = i_height >> 1;
- int i_delta = ( i_width - i_mid ) >> 1;
- int i_y2 = ( ( i_height - 1 ) >> 1 ) * 2;
- DrawTriangle( p_subpic, i_delta, 0, i_width - i_delta, i_y2,
- STYLE_FILLED );
- }
- else if( i_type == OSD_SPEAKER_ICON || i_type == OSD_MUTE_ICON )
- {
- int i_mid = i_height >> 1;
- int i_delta = ( i_width - i_mid ) >> 1;
- int i_y2 = ( ( i_height - 1 ) >> 1 ) * 2;
- DrawRect( p_subpic, i_delta, i_mid / 2, i_width - i_delta,
- i_height - 1 - i_mid / 2, STYLE_FILLED );
- DrawTriangle( p_subpic, i_width - i_delta, 0, i_delta, i_y2,
- STYLE_FILLED );
- if( i_type == OSD_MUTE_ICON )
- {
- uint8_t *p_a = p_subpic->p_region->picture.A_PIXELS;
- int i_pitch = p_subpic->p_region->picture.Y_PITCH;
- int i;
- for( i = 1; i < i_pitch; i++ )
- {
- int k = i + ( i_height - i - 1 ) * i_pitch;
- p_a[ k ] = 0xff - p_a[ k ];
- }
- }
- }