Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Borghetti <bdiego@gmail.com>2009-03-02 08:20:48 +0300
committerDiego Borghetti <bdiego@gmail.com>2009-03-02 08:20:48 +0300
commitacc8d06b777c5c0aa812295014b421c2a5badcf2 (patch)
tree549d6b7a6d17c89edd682ff951db68b80c0af8b9 /source/blender/blenfont/intern/blf.c
parent06629033b30ae29a4d63372bcfc5e670d439891a (diff)
Cleanup a little before add internal font (bmfont).
Diffstat (limited to 'source/blender/blenfont/intern/blf.c')
-rw-r--r--source/blender/blenfont/intern/blf.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index 5b39c2c8ae5..fd2047367dd 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -252,29 +252,24 @@ void BLF_position(float x, float y, float z)
{
#ifdef WITH_FREETYPE2
FontBLF *font;
- float remainder, aspect;
+ float remainder;
font= global_font[global_font_cur];
if (font) {
- if (font->flags & BLF_ASPECT)
- aspect= font->aspect;
- else
- aspect= 1.0f;
-
remainder= x - floor(x);
if (remainder > 0.4 && remainder < 0.6) {
if (remainder < 0.5)
- x -= 0.1 * aspect;
+ x -= 0.1 * font->aspect;
else
- x += 0.1 * aspect;
+ x += 0.1 * font->aspect;
}
remainder= y - floor(y);
if (remainder > 0.4 && remainder < 0.6) {
if (remainder < 0.5)
- y -= 0.1 * aspect;
+ y -= 0.1 * font->aspect;
else
- y += 0.1 * aspect;
+ y += 0.1 * font->aspect;
}
font->pos[0]= x;
@@ -308,9 +303,7 @@ void BLF_draw(char *str)
glPushMatrix();
glTranslatef(font->pos[0], font->pos[1], font->pos[2]);
-
- if (font->flags & BLF_ASPECT)
- glScalef(font->aspect, font->aspect, 1.0);
+ glScalef(font->aspect, font->aspect, 1.0);
if (font->flags & BLF_ROTATION)
glRotatef(font->angle, 0.0f, 0.0f, 1.0f);