Commit a4d95074 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

gdiplus/tests: Add Pen Transform tests.

parent 0a7cd7c1
......@@ -366,6 +366,69 @@ static void test_compoundarray(void)
GdipDeletePen(pen);
}
static void test_transform(void)
{
GpStatus status;
GpPen *pen;
GpMatrix *matrix, *matrix2;
REAL values[6];
status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);
expect(Ok, status);
status = GdipCreateMatrix(&matrix);
expect(Ok, status);
status = GdipGetPenTransform(pen, matrix);
todo_wine expect(Ok, status);
status = GdipGetMatrixElements(matrix, values);
expect(Ok, status);
expectf(1.0, values[0]);
expectf(0.0, values[1]);
expectf(0.0, values[2]);
expectf(1.0, values[3]);
expectf(0.0, values[4]);
expectf(0.0, values[5]);
GdipCreateMatrix2(3.0, -2.0, 5.0, 2.0, 6.0, 3.0, &matrix2);
status = GdipSetPenTransform(pen, matrix2);
todo_wine expect(Ok, status);
GdipDeleteMatrix(matrix2);
status = GdipGetPenTransform(pen, matrix);
todo_wine expect(Ok, status);
status = GdipGetMatrixElements(matrix, values);
expect(Ok, status);
todo_wine {
expectf(3.0, values[0]);
expectf(-2.0, values[1]);
expectf(5.0, values[2]);
expectf(2.0, values[3]);
expectf(6.0, values[4]);
expectf(3.0, values[5]);
}
status = GdipResetPenTransform(pen);
todo_wine expect(Ok, status);
status = GdipGetPenTransform(pen, matrix);
todo_wine expect(Ok, status);
status = GdipGetMatrixElements(matrix, values);
expect(Ok, status);
expectf(1.0, values[0]);
expectf(0.0, values[1]);
expectf(0.0, values[2]);
expectf(1.0, values[3]);
expectf(0.0, values[4]);
expectf(0.0, values[5]);
GdipDeletePen(pen);
GdipDeleteMatrix(matrix);
}
START_TEST(pen)
{
struct GdiplusStartupInput gdiplusStartupInput;
......@@ -387,6 +450,7 @@ START_TEST(pen)
test_customcap();
test_penfilltype();
test_compoundarray();
test_transform();
GdiplusShutdown(gdiplusToken);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment