Index: source/blender/src/drawipo.c =================================================================== --- source/blender/src/drawipo.c (revision 11154) +++ source/blender/src/drawipo.c (working copy) @@ -44,7 +44,6 @@ #include #endif -#include "BMF_Api.h" #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" @@ -80,7 +79,10 @@ #include "BIF_glutil.h" #include "BIF_editseq.h" #include "BIF_editaction.h" +#include "BIF_language.h" +#include "FTF_Api.h" + #include "BSE_drawipo.h" #include "BSE_view.h" #include "BSE_editipo.h" @@ -133,8 +135,11 @@ str[len+1]= 0; } - glRasterPos2f(x, y); - BMF_DrawString(G.fonts, str); + glRasterPos2f(x, y); + BIF_RasterPos(x, y); + BIF_SetScale(1.0); + FTF_SetFontSize('m'); + BIF_DrawString(G.fonts, str, 0); } static void step_to_grid(float *step, int *macht) @@ -707,8 +712,8 @@ ei= sipo->editipo; for(a=0; atotipo; a++, ei++) { - if (BMF_GetStringWidth(G.font, ei->name) + 18 > ipowidth) - ipowidth = BMF_GetStringWidth(G.font, ei->name) + 18; + if (BIF_GetStringWidth(G.font, ei->name, 0) + 18 > ipowidth) + ipowidth = BIF_GetStringWidth(G.font, ei->name, 0) + 18; } return ipowidth; Index: source/blender/src/drawtime.c =================================================================== --- source/blender/src/drawtime.c (revision 11154) +++ source/blender/src/drawtime.c (working copy) @@ -59,10 +59,10 @@ #include "BIF_mywindow.h" #include "BIF_screen.h" #include "BIF_resources.h" +#include "BIF_language.h" #include "BSE_drawipo.h" #include "BSE_view.h" -#include "BMF_Api.h" #include "blendef.h" @@ -92,6 +92,7 @@ if(stime->flag & TIME_CFRA_NUM) { short mval[2]; float x, y; + float xscale, yscale; char str[32]; /* little box with frame */ @@ -107,16 +108,23 @@ areamouseco_to_ipoco(G.v2d, mval, &x, &y); if(stime->flag & TIME_DRAWFRAMES) - sprintf(str, " %d\n", (G.scene->r.cfra)); - else sprintf(str, " %.2f\n", (G.scene->r.cfra/(float)G.scene->r.frs_sec)); + sprintf(str, " %d", (G.scene->r.cfra)); + else sprintf(str, " %.2f", (G.scene->r.cfra/(float)G.scene->r.frs_sec)); /* HACK! somehow the green color won't go away... */ glColor4ub(0, 0, 0, 0); BIF_ThemeColor(TH_TEXT); - glRasterPos2f(x, y); - BMF_DrawString(G.fonts, str); + xscale = (G.v2d->mask.xmax-G.v2d->mask.xmin)/(G.v2d->cur.xmax-G.v2d->cur.xmin); + yscale = (G.v2d->mask.ymax-G.v2d->mask.ymin)/(G.v2d->cur.ymax-G.v2d->cur.ymin); + + /* because the frame number text is otherwise subject to the same scaling as the contents of the view */ + glScalef( 1.0/xscale, 1.0/yscale, 1.0); + glRasterPos2f(x * xscale, y * yscale); + BIF_RasterPos(x * xscale, y * yscale); + BIF_DrawString(G.fonts, str, 0); + } } @@ -143,25 +151,28 @@ BIF_icon_draw(xpos-(5.0*(xspace/xpixels)), 12.0*yspace/ypixels, ICON_MARKER); glBlendFunc(GL_ONE, GL_ZERO); - glDisable(GL_BLEND); + glDisable(GL_BLEND); /* and the marker name too, shifted slightly to the top-right */ if(marker->name && marker->name[0]) { if(marker->flag & SELECT) { BIF_ThemeColor(TH_TEXT_HI); - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), - ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + BIF_RasterPos(xpos+(4.0*(xspace/xpixels)), ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); } else { BIF_ThemeColor(TH_TEXT); - if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra)) - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), - ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); - else + if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra)){ + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + BIF_RasterPos(xpos+(4.0*(xspace/xpixels)), ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + }else{ glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels); + BIF_RasterPos(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels); + } } - BMF_DrawString(G.font, marker->name); + BIF_DrawString(G.font, marker->name, 0); } + } static void draw_markers_time(void) @@ -363,6 +374,7 @@ /* ortho at pixel level curarea */ myortho2(-0.375, curarea->winx-0.375, -0.375, curarea->winy-0.375); + //printf("drawtimespace: curarea->winx-0.375:%g, curarea->winy-0.375:%g\n",curarea->winx-0.375, curarea->winy-0.375); /* the bottom with time values */ BIF_ThemeColor(TH_HEADER);