From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/tests/matrix.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
diff --git a/dlls/gdiplus/tests/matrix.c b/dlls/gdiplus/tests/matrix.c index 5ca0209f6a9..7ae91780192 100644 --- a/dlls/gdiplus/tests/matrix.c +++ b/dlls/gdiplus/tests/matrix.c @@ -110,6 +110,38 @@ static void test_transform(void) GdipDeleteMatrix(matrix); }
+static void test_scale(void) +{ + GpStatus status; + GpMatrix *matrix = NULL; + GpMatrix *expected_matrix = NULL; + BOOL equal = FALSE; + + GdipCreateMatrix2(1.0, -2.0, 30.0, 40.0, -500.0, 600.0, &matrix); + + status = GdipScaleMatrix(NULL, 3, 2, MatrixOrderAppend); + expect(InvalidParameter, status); + status = GdipScaleMatrix(matrix, 3, 2, MatrixOrderAppend); + expect(Ok, status); + + GdipCreateMatrix2(3.0, -6.0, 60.0, 80.0, 0.0, 0.0, &expected_matrix); + expect(Ok, status); + GdipIsMatrixEqual(matrix, expected_matrix, &equal); + expect(TRUE, equal); + GdipDeleteMatrix(matrix); + + GdipCreateMatrix2(1.0, -2.0, 30.0, 40.0, -500.0, 600.0, &matrix); + + status = GdipScaleMatrix(matrix, 3, 2, MatrixOrderPrepend); + expect(Ok, status); + + GdipCreateMatrix2(3.0, -4.0, 90.0, 80.0, -1500.0, 1200.0, &expected_matrix); + expect(Ok, status); + GdipIsMatrixEqual(matrix, expected_matrix, &equal); + expect(TRUE, equal); + GdipDeleteMatrix(matrix); +} + static void test_isinvertible(void) { GpStatus status; @@ -390,6 +422,7 @@ START_TEST(matrix) GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
test_constructor_destructor(); + test_scale(); test_transform(); test_isinvertible(); test_invert();