gdiplus: Implemented GdipVectorTransformMatrixPoints.
authorNikolay Sivov <bunglehead@gmail.com>
Fri, 18 Apr 2008 00:39:03 +0000 (04:39 +0400)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 18 Apr 2008 11:57:15 +0000 (13:57 +0200)
dlls/gdiplus/gdiplus.spec
dlls/gdiplus/matrix.c
include/gdiplusflat.h

index da338244d587261334a0356ff8d8219e2e4482c7..f2426b19121f6e4c469bb2b4cc68914b864fc789 100644 (file)
 @ stub GdipTranslateRegionI
 @ stub GdipTranslateTextureTransform
 @ stdcall GdipTranslateWorldTransform(ptr long long long)
-@ stub GdipVectorTransformMatrixPoints
+@ stdcall GdipVectorTransformMatrixPoints(ptr ptr long)
 @ stub GdipVectorTransformMatrixPointsI
 @ stub GdipWarpPath
 @ stub GdipWidenPath
index dee6460f0fcafe66a7709c4b3112da8bac1b3994..a40f690e84d786bfda40f2ed9400eadfa8c93032 100644 (file)
@@ -281,3 +281,23 @@ GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX,
 
     return Ok;
 }
+
+GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
+{
+    REAL x, y;
+    INT i;
+
+    if(!matrix || !pts)
+        return InvalidParameter;
+
+    for(i = 0; i < count; i++)
+    {
+        x = pts[i].X;
+        y = pts[i].Y;
+
+        pts[i].X = x * matrix->matrix[0] + y * matrix->matrix[2];
+        pts[i].Y = x * matrix->matrix[1] + y * matrix->matrix[3];
+    }
+
+    return Ok;
+}
index c181b21ec866463e54d7960c1b92f872f7dbec0d..215864a3afcda96bd4b865e846d31276dc97dc5a 100644 (file)
@@ -229,6 +229,7 @@ GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix*,REAL,GpMatrixOrder);
 GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder);
 GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix*,REAL,REAL,REAL,REAL,REAL,REAL);
 GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT);
+GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix*,GpPointF*,INT);
 GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder);
 
 GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*);