Nikolay Sivov : gdiplus: Implemented GdipVectorTransformMatrixPointsI.

Alexandre Julliard julliard at winehq.org
Mon Apr 21 07:46:37 CDT 2008


Module: wine
Branch: master
Commit: f649c9d2244c5dafc5f0512ebeed12a8d38955bc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f649c9d2244c5dafc5f0512ebeed12a8d38955bc

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sat Apr 19 01:28:47 2008 +0400

gdiplus: Implemented GdipVectorTransformMatrixPointsI.

---

 dlls/gdiplus/gdiplus.spec |    2 +-
 dlls/gdiplus/matrix.c     |   27 +++++++++++++++++++++++++++
 include/gdiplusflat.h     |    1 +
 3 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index f2426b1..d6971f9 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -620,7 +620,7 @@
 @ stub GdipTranslateTextureTransform
 @ stdcall GdipTranslateWorldTransform(ptr long long long)
 @ stdcall GdipVectorTransformMatrixPoints(ptr ptr long)
-@ stub GdipVectorTransformMatrixPointsI
+@ stdcall GdipVectorTransformMatrixPointsI(ptr ptr long)
 @ stub GdipWarpPath
 @ stub GdipWidenPath
 @ stub GdipWindingModeOutline
diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c
index a40f690..e80031f 100644
--- a/dlls/gdiplus/matrix.c
+++ b/dlls/gdiplus/matrix.c
@@ -301,3 +301,30 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *
 
     return Ok;
 }
+
+GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count)
+{
+    GpPointF *ptsF;
+    GpStatus ret;
+    INT i;
+
+    ptsF = GdipAlloc(sizeof(GpPointF) * count);
+    if(!ptsF)
+        return OutOfMemory;
+
+    for(i = 0; i < count; i++){
+        ptsF[i].X = (REAL)pts[i].X;
+        ptsF[i].Y = (REAL)pts[i].Y;
+    }
+
+    ret = GdipVectorTransformMatrixPoints(matrix, ptsF, count);
+    /* store back */
+    if(ret == Ok)
+        for(i = 0; i < count; i++){
+            pts[i].X = roundr(ptsF[i].X);
+            pts[i].Y = roundr(ptsF[i].Y);
+        }
+    GdipFree(ptsF);
+
+    return ret;
+}
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 215864a..a8f6568 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -230,6 +230,7 @@ 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 GdipVectorTransformMatrixPointsI(GpMatrix*,GpPoint*,INT);
 GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder);
 
 GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*);




More information about the wine-cvs mailing list