use radians for BLF_rotation
This commit is contained in:
parent
8dca501045
commit
60c1a7898a
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue