CVS: main/libvo sub.c,1.18,1.19
Update of /cvsroot/mplayer/main/libvo In directory mplayer:/var/tmp.root/cvs-serv15213/libvo Modified Files: sub.c Log Message: changes according to proper subfont bar positioning and char spaceing - sub.c changes to scale from 0.100 to 0..255 for proper OSD displaying - mplayer.c Index: sub.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/sub.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- sub.c 15 Aug 2001 00:35:35 -0000 1.18 +++ sub.c 16 Aug 2001 09:25:32 -0000 1.19 @@ -38,10 +38,15 @@ int y=(dys-vo_font->height)/2; int x; int c,font; - int width=(dxs*2/3-vo_font->width[0x10]-vo_font->width[0x12]); - int elems=width/vo_font->width[0x11]; + int charw=vo_font->width[OSD_PB_0]+vo_font->charspace; + int delimw=vo_font->width[OSD_PB_START] + +vo_font->width[OSD_PB_END] + +vo_font->charspace; + int width=(2*dxs-3*delimw)/3; + int elems=width/charw; int mark=(vo_osd_progbar_value*(elems+1))>>8; - x=(dxs-width)/2; + x=(dxs-elems*charw-delimw)/2; + // printf("osd.progbar width=%d xpos=%d\n",width,x); c=vo_osd_progbar_type; @@ -61,7 +66,7 @@ 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); - x+=vo_font->width[c]; + x+=vo_font->width[c]+vo_font->charspace; c=OSD_PB_0; if ((font=vo_font->font[c])>=0) @@ -72,7 +77,7 @@ 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); - x+=vo_font->width[c]; + x+=charw; } c=OSD_PB_1; @@ -84,7 +89,7 @@ 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); - x+=vo_font->width[c]; + x+=charw; } c=OSD_PB_END; @@ -95,7 +100,7 @@ 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); -// x+=vo_font->width[c]; +// x+=vo_font->width[c]+vo_font->charspace; // vo_osd_progbar_value=(vo_osd_progbar_value+1)&0xFF;
participants (1)
-
Adam Tla/lka