use radians for BLF_rotation

This commit is contained in:
Campbell Barton 2013-02-21 17:15:19 +00:00
parent 8dca501045
commit 60c1a7898a
3 changed files with 4 additions and 4 deletions

View File

@ -516,8 +516,8 @@ static void blf_draw__start(FontBLF *font, GLint *mode, GLint *param)
if (font->flags & BLF_ASPECT)
glScalef(font->aspect[0], font->aspect[1], font->aspect[2]);
if (font->flags & BLF_ROTATION)
glRotatef(font->angle, 0.0f, 0.0f, 1.0f);
if (font->flags & BLF_ROTATION) /* radians -> degrees */
glRotatef(font->angle * (float)(180.0 / M_PI), 0.0f, 0.0f, 1.0f);
if (font->shadow || font->blur)
glGetFloatv(GL_CURRENT_COLOR, font->orig_col);

View File

@ -166,7 +166,7 @@ typedef struct FontBLF {
/* initial position for draw the text. */
float pos[3];
/* angle in degrees. */
/* angle in radians. */
float angle;
/* blur: 3 or 5 large kernel */

View File

@ -1805,7 +1805,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* draw vertical steps */
if (dfac > 0.0f) {
BLF_rotation_default(90.0f);
BLF_rotation_default(M_PI / 2);
BLF_enable_default(BLF_ROTATION);
for (; fac < vert.ymax - 10; fac += dfac, val += grid->dy) {