summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-18 18:58:34 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-18 18:58:34 +0000
commitc5bc1d693c91335fb86f04c5d13eed5ce61abcb4 (patch)
treeac99aae82daa2caebb1a3c72ae983fe1d23e793b /libass
parentf7c7e603499e0fc2b880bc82c80cbcfdc053a2fb (diff)
downloadmpv-c5bc1d693c91335fb86f04c5d13eed5ce61abcb4.tar.bz2
mpv-c5bc1d693c91335fb86f04c5d13eed5ce61abcb4.tar.xz
Revert y-axis rotation. Change order of rotations.
Now rotations are performed in the following order: X, Y, Z. Before this, it was the other way around. Also, in FreeType Y axis is directed upwards, so the corresponding rotation must be reverted. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23340 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 8bbc7be931..5f235068a5 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1670,6 +1670,7 @@ static inline void transform_glyph_3d(FT_Glyph glyph, double *m, FT_Vector shift
*/
static void transform_3d(FT_Vector shift, FT_Glyph* glyph, FT_Glyph* glyph2, double frx, double fry, double frz)
{
+ fry = - fry; // FreeType's y axis goes in the opposite direction
if (frx != 0. || fry != 0. || frz != 0.) {
double m[16];
double sx = sin(frx);
@@ -1678,10 +1679,10 @@ static void transform_3d(FT_Vector shift, FT_Glyph* glyph, FT_Glyph* glyph2, dou
double cx = cos(frx);
double cy = cos(fry);
double cz = cos(frz);
- m[0] = cy * cz; m[1] = cz*sx*sy + sz*cx; m[2] = sz*sx - cz*cx*sy; m[3] = 0.0;
- m[4] = -sz*cy; m[5] = cz*cx - sz*sy*sx; m[6] = sz*sy*cx + cz*sx; m[7] = 0.0;
- m[8] = sy; m[9] = -sx*cy; m[10] = cx*cy; m[11] = 0.0;
- m[12] = 0.0; m[13] = 0.0; m[14] = 0.0; m[15] = 1.0;
+ m[0] = cy * cz; m[1] = cy*sz; m[2] = -sy; m[3] = 0.0;
+ m[4] = -cx*sz + sx*sy*cz; m[5] = cx*cz + sx*sy*sz; m[6] = sx*cy; m[7] = 0.0;
+ m[8] = sx*sz + cx*sy*cz; m[9] = -sx*cz + cx*sy*sz; m[10] = cx*cy; m[11] = 0.0;
+ m[12] = 0.0; m[13] = 0.0; m[14] = 0.0; m[15] = 1.0;
if (glyph && *glyph)
transform_glyph_3d(*glyph, m, shift);