28#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
29#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got)
33 unsigned int diff =
x >
y ?
x -
y :
y -
x;
35 return diff <= max_diff;
58 ok(
matrix !=
NULL,
"Expected matrix to be initialized\n");
93 for(
i = 0;
i < 10;
i ++){
95 pts[
i].
Y = 50.0 -
i * 5.0;
106 for(
i = 0;
i < 10;
i ++){
110 ok(
match,
"Expected #%d to be (%.2f, %.2f) but got (%.2f, %.2f)\n",
i,
123 static const REAL expected_elem_append[] = {1.0, -2.0, 30.0, 40.0, -470.0, 620.0};
124 static const REAL expected_elem_prepend[] = {1.0, -2.0, 30.0, 40.0, 130.0, 1340.0};
137 for(
INT i = 0;
i < 6;
i++)
138 ok(expected_elem_append[
i] == elems[
i],
"Expected #%d to be (%.1f) but got (%.1f)\n",
i,
139 expected_elem_append[
i], elems[
i]);
150 for(
INT i = 0;
i < 6;
i++)
151 ok(expected_elem_prepend[
i] == elems[
i],
"Expected #%d to be (%.1f) but got (%.1f)\n",
i,
152 expected_elem_prepend[
i], elems[
i]);
163 static const REAL expected_elem[] = {3.0, -4.0, 90.0, 80.0, -1500.0, 1200.0};
164 static const REAL expected_elem2[] = {3.0, -6.0, 60.0, 80.0, -500.0, 600.0};
177 for(
i = 0;
i < 6;
i++)
178 ok(expected_elem[
i] == elems[
i],
"Expected #%d to be (%.1f) but got (%.1f)\n",
i,
179 expected_elem[
i], elems[
i]);
190 for(
i = 0;
i < 6;
i++)
191 ok(expected_elem2[
i] == elems[
i],
"Expected #%d to be (%.1f) but got (%.1f)\n",
i,
192 expected_elem2[
i], elems[
i]);
247 GdipCreateMatrix2(2.0/16.0, 2.0/16.0, -5.0/16.0, 3.0/16.0, 3.0/16.0, -21.0/16.0, &inverted);
257 ok(
compare_float(elems[0], 1666.666504, 1),
"elems[0] = %.10g\n", elems[0]);
260 ok(
compare_float(elems[3], 1666.666504, 1),
"elems[3] = %.10g\n", elems[3]);
261 ok(
compare_float(elems[4], -666666.6875, 1),
"elems[4] = %.10g\n", elems[4]);
262 ok(
compare_float(elems[5], -666666.6875, 1),
"elems[5] = %.10g\n", elems[5]);
#define GetProcAddress(x, y)
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
GpStatus WINGDIPAPI GdipShearMatrix(GpMatrix *matrix, REAL shearX, REAL shearY, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *rect, GDIPCONST GpPointF *pt, GpMatrix **matrix)
GpStatus WINGDIPAPI GdipIsMatrixEqual(GDIPCONST GpMatrix *matrix, GDIPCONST GpMatrix *matrix2, BOOL *result)
GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix *matrix, REAL *out)
GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *result)
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix *matrix)
GpStatus WINGDIPAPI GdipIsMatrixInvertible(GDIPCONST GpMatrix *matrix, BOOL *result)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
_ACRTIMP errno_t __cdecl _controlfp_s(unsigned int *, unsigned int, unsigned int)
_ACRTIMP double __cdecl fabs(double)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
void WINAPI GdiplusShutdown(ULONG_PTR)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLboolean GLenum GLenum GLvoid * values
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define compare_float(got, exp)
static void test_isinvertible(void)
static real_point transform_points[]
static void test_shear(void)
static BOOL compare_uint(unsigned int x, unsigned int y, unsigned int max_diff)
static void test_scale(void)
static void test_translate(void)
static void test_constructor3(void)
#define expect(expected, got)
#define expectf(expected, got)
static void test_isidentity(void)
static void test_constructor_destructor(void)
static void test_invert(void)
static void test_transform(void)