From 0f42f4c532ab21c3f7f8acce3c36cbb2661a7508 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 17 Apr 2008 03:02:05 +0400 Subject: [PATCH] gdiplus: Implement GdipCreateMatrix3I. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/matrix.c | 17 +++++++++++++++++ include/gdiplusflat.h | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index d87979e066d..14e32eb99b0 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -106,7 +106,7 @@ @ stub GdipCreateLineBrushI @ stdcall GdipCreateMatrix2(long long long long long long ptr) @ stdcall GdipCreateMatrix3(ptr ptr ptr) -@ stub GdipCreateMatrix3I +@ stdcall GdipCreateMatrix3I(ptr ptr ptr) @ stdcall GdipCreateMatrix(ptr) @ stdcall GdipCreateMetafileFromEmf(ptr long ptr) @ stub GdipCreateMetafileFromFile diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index 2ee445829b0..dee6460f0fc 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -89,6 +89,23 @@ GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *rect, return Ok; } +GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint *pt, + GpMatrix **matrix) +{ + GpRectF rectF; + GpPointF ptF; + + rectF.X = (REAL)rect->X; + rectF.Y = (REAL)rect->Y; + rectF.Width = (REAL)rect->Width; + rectF.Height = (REAL)rect->Height; + + ptF.X = (REAL)pt->X; + ptF.Y = (REAL)pt->Y; + + return GdipCreateMatrix3(&rectF, &ptF, matrix); +} + GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone) { if(!matrix || !clone) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 933475e65b9..3819e992f9c 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -219,6 +219,8 @@ GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *,GDIPCONST GpPointF*, GpMatrix**); +GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect*,GDIPCONST GpPoint*,GpMatrix**); + GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*); GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*); GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder); -- 2.11.4.GIT