From 098e4234b113fdff9804ef76b6f0bdb12a6bac3b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Feb 2013 02:30:02 +0000 Subject: minor change to own recent commit with transform fcurve centers and some style edits and typo corrections. --- source/blender/blenfont/BLF_translation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h index fd8b30d1d1b..cbfc7c28d8d 100644 --- a/source/blender/blenfont/BLF_translation.h +++ b/source/blender/blenfont/BLF_translation.h @@ -112,7 +112,7 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid); /* Default, void context. * WARNING! The "" context is not the same as no (NULL) context at mo/boost::locale level! - * NOTE: We translate BLF_I18NCONTEXT_DEFAULT as BLF_I18NCONTEXT_DEFAULT_BPY in Python, as we can’t use "natural" + * NOTE: We translate BLF_I18NCONTEXT_DEFAULT as BLF_I18NCONTEXT_DEFAULT_BPY in Python, as we can't use "natural" * None value in rna string properties... :/ * For perf reason, we only use the first char to detect this context, so other contexts should never start * with the same char! -- cgit v1.2.3 From 60c1a7898a51608b62460c671663aed525791fe3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Feb 2013 17:15:19 +0000 Subject: use radians for BLF_rotation --- source/blender/blenfont/intern/blf.c | 4 ++-- source/blender/blenfont/intern/blf_internal_types.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 16756769675..c622f8c35a2 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -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); diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 1acc3dad4cf..de6e70e4461 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -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 */ -- cgit v1.2.3 From a31a93ca3f479739fe07173b65dc042ca4b7aa64 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 21 Feb 2013 17:39:48 +0000 Subject: Compile fixes for recent code cleanups: * M_PI was not declared for MSVC. --- source/blender/blenfont/intern/blf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index c622f8c35a2..061e8e28607 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -43,6 +43,8 @@ #include "DNA_listBase.h" #include "DNA_vec_types.h" +#include "BLI_math.h" + #include "BIF_gl.h" #include "BLF_api.h" -- cgit v1.2.3