[11/18] gdiplus: added GdipTransformMatrixPoints
Evan Stade
estade at gmail.com
Wed Jul 11 20:07:52 CDT 2007
Hi,
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/matrix.c | 21 +++++++++++++++++++++
include/gdiplusflat.h | 1 +
3 files changed, 23 insertions(+), 1 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index b349e01..5879360 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -582,7 +582,7 @@
@ stub GdipStringFormatGetGenericDefault
@ stub GdipStringFormatGetGenericTypographic
@ stub GdipTestControl
-@ stub GdipTransformMatrixPoints
+@ stdcall GdipTransformMatrixPoints(ptr ptr long)
@ stub GdipTransformMatrixPointsI
@ stub GdipTransformPath
@ stub GdipTransformPoints
diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c
index 919e1d4..909bfee 100644
--- a/dlls/gdiplus/matrix.c
+++ b/dlls/gdiplus/matrix.c
@@ -56,3 +56,24 @@ GpStatus WINGDIPAPI GdipDeleteMatrix(GpM
return Ok;
}
+
+GpStatus WINGDIPAPI GdipTransformMatrixPoints(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] + matrix->matrix[4];
+ pts[i].Y = x * matrix->matrix[1] + y * matrix->matrix[3] + matrix->matrix[5];
+ }
+
+ return Ok;
+}
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 5a48fdc..9185fd5 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -62,6 +62,7 @@ GpStatus WINGDIPAPI GdipStartPathFigure(
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**);
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*);
+GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT);
#ifdef __cplusplus
}
--
1.4.1
More information about the wine-patches
mailing list