summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/trans.c
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-02-19 00:32:39 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2013-02-19 00:32:39 +0000
commitb9a5b9cad6d163192c3ab462fc86adc525a81e71 (patch)
tree11f84a8fdd80d31f9e49565a2e75a4e782146308 /Build/source/texk/web2c/xetexdir/trans.c
parente43ae240f33296136cb498e6d9d0e9a55eba7493 (diff)
Sync with XeTeX
git-svn-id: svn://tug.org/texlive/trunk@29157 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/trans.c')
-rw-r--r--Build/source/texk/web2c/xetexdir/trans.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/Build/source/texk/web2c/xetexdir/trans.c b/Build/source/texk/web2c/xetexdir/trans.c
index 9e2ab0e5b70..405347756b8 100644
--- a/Build/source/texk/web2c/xetexdir/trans.c
+++ b/Build/source/texk/web2c/xetexdir/trans.c
@@ -34,78 +34,54 @@ authorization from the copyright holders.
void makeidentity(transform* t)
{
-#ifdef XETEX_MAC
- *t = CGAffineTransformMake(1.0, 0.0, 0.0, 1.0, 0.0, 0.0);
-#else
t->a = 1.0;
t->b = 0.0;
t->c = 0.0;
t->d = 1.0;
t->x = 0.0;
t->y = 0.0;
-#endif
}
void makescale(transform* t, double xscale, double yscale)
{
-#ifdef XETEX_MAC
- *t = CGAffineTransformMakeScale(xscale, yscale);
-#else
t->a = xscale;
t->b = 0.0;
t->c = 0.0;
t->d = yscale;
t->x = 0.0;
t->y = 0.0;
-#endif
}
void maketranslation(transform* t, double dx, double dy)
{
-#ifdef XETEX_MAC
- *t = CGAffineTransformMakeTranslation(dx, dy);
-#else
t->a = 1.0;
t->b = 0.0;
t->c = 0.0;
t->d = 1.0;
t->x = dx;
t->y = dy;
-#endif
}
#include <stdio.h>
void makerotation(transform* t, double a)
{
-#ifdef XETEX_MAC
- *t = CGAffineTransformMakeRotation(a);
-#else
t->a = cos(a);
t->b = sin(a);
t->c = -sin(a);
t->d = cos(a);
t->x = 0.0;
t->y = 0.0;
-#endif
}
void transformpoint(realpoint* p, const transform* t)
{
-#ifdef XETEX_MAC
- CGPoint r = CGPointApplyAffineTransform(*(CGPoint*)p, *t);
- *p = *(realpoint*)&r;
-#else
realpoint r;
r.x = t->a * p->x + t->c * p->y + t->x;
r.y = t->b * p->x + t->d * p->y + t->y;
*p = r;
-#endif
}
void transformconcat(transform* t1, const transform* t2)
{
-#ifdef XETEX_MAC
- *t1 = CGAffineTransformConcat(*t1, *t2);
-#else
transform r;
r.a = t1->a * t2->a + t1->b * t2->c + 0.0 * t2->x;
r.b = t1->a * t2->b + t1->b * t2->d + 0.0 * t2->y;
@@ -114,5 +90,4 @@ void transformconcat(transform* t1, const transform* t2)
r.x = t1->x * t2->a + t1->y * t2->c + 1.0 * t2->x;
r.y = t1->x * t2->b + t1->y * t2->d + 1.0 * t2->y;
*t1 = r;
-#endif
}