From 9cce789881caddb67be8dede18adbe854af16950 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 29 Apr 2008 00:10:25 +0400 Subject: [PATCH] gdiplus: Implemented GdipGetPathGradientCenterPointI. --- dlls/gdiplus/brush.c | 19 +++++++++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 5d0a1dec331..31c7cf15b21 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -488,6 +488,25 @@ GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient *grad, return Ok; } +GpStatus WINGDIPAPI GdipGetPathGradientCenterPointI(GpPathGradient *grad, + GpPoint *point) +{ + GpStatus ret; + GpPointF ptf; + + if(!point) + return InvalidParameter; + + ret = GdipGetPathGradientCenterPoint(grad,&ptf); + + if(ret == Ok){ + point->X = roundr(ptf.X); + point->Y = roundr(ptf.Y); + } + + return ret; +} + GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient *grad, REAL *x, REAL *y) { diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index c06fa2ea1ce..8e8e94f60ae 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -329,7 +329,7 @@ @ stub GdipGetPathGradientBlendCount @ stub GdipGetPathGradientCenterColor @ stdcall GdipGetPathGradientCenterPoint(ptr ptr) -@ stub GdipGetPathGradientCenterPointI +@ stdcall GdipGetPathGradientCenterPointI(ptr ptr) @ stdcall GdipGetPathGradientFocusScales(ptr ptr ptr) @ stdcall GdipGetPathGradientGammaCorrection(ptr ptr) @ stub GdipGetPathGradientPath diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index dbf1c85b652..49464d88f35 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -169,6 +169,7 @@ GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient*,GpRect*); GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient*,ARGB*); GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*); GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*); +GpStatus WINGDIPAPI GdipGetPathGradientCenterPointI(GpPathGradient*,GpPoint*); GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*); GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient*,BOOL*); GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient*,INT*);