Change the BLF_aspect function to handle 3d text.

This is need to properly handle 3d text (dalai work on GE), before
the BLF_aspect only take one argument, and the result was a call to:
	glScalef(aspect, aspect, 1.0)

Now the three value are store in the font (x, y and z) and also
need to be enable using BLF_enable(BLF_ASPECT).

By default all the code that don't have BLF_ASPECT enable work with
a scale of 1.0 (so nothing change to the current UI).

I also remove all the call of BLF_aspect(fontid, 1.0) found in
the editors, because is disable by default, so no need any more.

Campbell the only thing to check is the python api, right now
I modify the api to from:
	BLF_aspect(fontid, aspect)
to:
	BLF_aspect(fontid, aspect, aspect, 1.0)

This is to avoid break the api, but now you need add the BLF_ASPECT
option to the function py_blf_enable and in some point change
py_blf_aspect to take 3 arguments.
This commit is contained in:
2010-12-09 22:27:55 +00:00
parent 3ee53d7b5f
commit 545cc4803e
11 changed files with 68 additions and 24 deletions

View File

@@ -99,7 +99,7 @@ static PyObject *py_blf_aspect(PyObject *UNUSED(self), PyObject *args)
if (!PyArg_ParseTuple(args, "if:blf.aspect", &fontid, &aspect))
return NULL;
BLF_aspect(fontid, aspect);
BLF_aspect(fontid, aspect, aspect, 1.0);
Py_RETURN_NONE;
}