diff options
author | atlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-21 11:28:50 +0000 |
---|---|---|
committer | atlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-21 11:28:50 +0000 |
commit | 9d7ee85cd00f23a28608fee0669b5966ce8583e3 (patch) | |
tree | 51de264984eb37f523c14a3822f0f2d8af1e9417 /libvo/sub.c | |
parent | 68e249ef591f3af3f586431c685368c62fdbd2ff (diff) | |
download | mpv-9d7ee85cd00f23a28608fee0669b5966ce8583e3.tar.bz2 mpv-9d7ee85cd00f23a28608fee0669b5966ce8583e3.tar.xz |
minor changes according to OSD
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1603 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/sub.c')
-rw-r--r-- | libvo/sub.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/libvo/sub.c b/libvo/sub.c index bec952ae19..756072003b 100644 --- a/libvo/sub.c +++ b/libvo/sub.c @@ -33,7 +33,9 @@ int vo_osd_progbar_type=-1; int vo_osd_progbar_value=100; // 0..255 inline static void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ - int i; + unsigned char *s; + unsigned char *sa; + int i,w,h,st; int y=(dys-vo_font->height)/2; int c,font; int delimw=vo_font->width[OSD_PB_START] @@ -69,28 +71,30 @@ inline static void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x x+=vo_font->width[c]+vo_font->charspace; c=OSD_PB_0; - if ((font=vo_font->font[c])>=0) + if ((font=vo_font->font[c])>=0){ + w=vo_font->width[c]; + h=vo_font->pic_a[font]->h; + s=vo_font->pic_b[font]->bmp+vo_font->start[c]; + sa=vo_font->pic_a[font]->bmp+vo_font->start[c]; + st=vo_font->pic_a[font]->w; for (i=mark;i--;){ - draw_alpha(x,y, - vo_font->width[c], - vo_font->pic_a[font]->h, - vo_font->pic_b[font]->bmp+vo_font->start[c], - vo_font->pic_a[font]->bmp+vo_font->start[c], - vo_font->pic_a[font]->w); + draw_alpha(x,y,w,h,s,sa,st); x+=charw; } + } c=OSD_PB_1; - if ((font=vo_font->font[c])>=0) + if ((font=vo_font->font[c])>=0){ + w=vo_font->width[c]; + h=vo_font->pic_a[font]->h; + s =vo_font->pic_b[font]->bmp+vo_font->start[c]; + sa=vo_font->pic_a[font]->bmp+vo_font->start[c]; + st=vo_font->pic_a[font]->w; for (i=elems-mark;i--;){ - draw_alpha(x,y, - vo_font->width[c], - vo_font->pic_a[font]->h, - vo_font->pic_b[font]->bmp+vo_font->start[c], - vo_font->pic_a[font]->bmp+vo_font->start[c], - vo_font->pic_a[font]->w); + draw_alpha(x,y,w,h,s,sa,st); x+=charw; } + } c=OSD_PB_END; if ((font=vo_font->font[c])>=0) @@ -136,7 +140,7 @@ inline static void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,in memdxs=dxs; memdys=memy=dys; - // too long lines divide into smaller ones + // too long lines divide into a smaller ones i=k=lines=lasth=0; h=vo_font->height; xsize=-vo_font->charspace; @@ -187,14 +191,14 @@ inline static void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,in } else if (j<len) continue; if (h>memy){ // out of the screen so end parsing - memy +=vo_font->height-lasth; // correct y position + memy +=vo_font->height-lasth; // correct the y position l=0; break; } utbl[k++]=0; xtbl[lines++]=(dxs-xsize)/2; if (lines==MAX_UCSLINES||k>MAX_UCS){ l=0; break; - } else if(l || j<len){ // not last line or not last char + } else if(l || j<len){ // not the last line or not the last char lastStripPosition=-1; xsize=-vo_font->charspace; lasth=h; |