[GDI32_APITEST]

Remove the stuff that shouldn't have been comitted.

svn path=/trunk/; revision=50331
This commit is contained in:
Timo Kreuzer 2011-01-08 19:20:20 +00:00
parent ae1bdd5334
commit c265d7532b

View file

@ -12,76 +12,6 @@
#include <reactos/win32k/ntgdityp.h>
#include <reactos/win32k/ntgdihdl.h>
#define MAX_OFFSET 4294967040.0
BOOL
WINAPI
CombineTransform(
LPXFORM pxfResult,
const XFORM *pxf1,
const XFORM *pxf2)
{
XFORM xformTmp;
/* Do matrix multiplication */
xformTmp.eM11 = pxf1->eM11 * pxf2->eM11 + pxf1->eM12 * pxf2->eM21;
xformTmp.eM12 = pxf1->eM11 * pxf2->eM12 + pxf1->eM12 * pxf2->eM22;
xformTmp.eM21 = pxf1->eM21 * pxf2->eM11 + pxf1->eM22 * pxf2->eM21;
xformTmp.eM22 = pxf1->eM21 * pxf2->eM12 + pxf1->eM22 * pxf2->eM22;
xformTmp.eDx = pxf1->eDx * pxf2->eM11 + pxf1->eDy * pxf2->eM21 + pxf2->eDx;
xformTmp.eDy = pxf1->eDx * pxf2->eM12 + pxf1->eDy * pxf2->eM22 + pxf2->eDy;
#if 0
ok(pxf1->eM11 * pxf2->eM11 == pxf2->eM11 * pxf1->eM11, "1: %f, %f -> %f, %f\n",
pxf1->eM11, pxf2->eM11, pxf1->eM11 * pxf2->eM11, pxf2->eM11 * pxf1->eM11);
ok(pxf1->eM11 * pxf2->eM12 == pxf2->eM12 * pxf1->eM11, "2: %f, %f -> %f, %f\n",
pxf1->eM11, pxf2->eM12, pxf1->eM11 * pxf2->eM12, pxf2->eM12 * pxf1->eM11);
ok(pxf1->eM21 * pxf2->eM11 == pxf2->eM11 * pxf1->eM21, "3\n");
ok(pxf1->eM21 * pxf2->eM12 == pxf2->eM12 * pxf1->eM21, "4\n");
ok(pxf1->eM12 * pxf2->eM21 == pxf2->eM21 * pxf1->eM12, "5\n");
ok(pxf1->eM12 * pxf2->eM22 == pxf2->eM22 * pxf1->eM12, "6\n");
ok(pxf1->eM22 * pxf2->eM21 == pxf2->eM21 * pxf1->eM22, "7\n");
ok(pxf1->eM22 * pxf2->eM22 == pxf2->eM22 * pxf1->eM22, "8\n");
#endif
*pxfResult = xformTmp;
/* windows compatibility fixups */
if (_isnan(xformTmp.eM12))
{
if (pxf1->eM11 == 0 || pxf2->eM12 == 0) pxfResult->eM12 = 0.;
}
if (_isnan(xformTmp.eM21)) pxfResult->eM21 = 0.;
if (_isnan(xformTmp.eDx)) pxfResult->eDx = 0.;
if (_isnan(xformTmp.eDy)) pxfResult->eDy = 0.;
/* Check for invalid offset range */
if (xformTmp.eDx > MAX_OFFSET || xformTmp.eDx < -MAX_OFFSET ||
xformTmp.eDy > MAX_OFFSET || xformTmp.eDy < -MAX_OFFSET)
{
return FALSE;
}
return TRUE;
}
void
RandXform(XFORM *pxform)
{
XFORML *pxforml = (XFORML*)pxform;
pxforml->eM11 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand();
pxforml->eM12 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand();
pxforml->eM21 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand();
pxforml->eM22 ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand();
pxforml->eDx ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand();
pxforml->eDy ^= (rand() << 16) ^ (rand() << (rand() % 16)) ^ rand();
}
void Test_CombineTransform()
{
XFORM xform1, xform2, xform3;