[1/2] gdiplus: GdipVectorTransformMatrixPointsI
Nikolay Sivov
bunglehead at gmail.com
Fri Apr 18 16:28:47 CDT 2008
Changelog:
- 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..47eb8e2 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*);
--
1.4.4.4
More information about the wine-patches
mailing list