[7/11] gdiplus: added GdipG/SetPathGradientCenterPoint
Evan Stade
estade at gmail.com
Thu Aug 2 19:52:59 CDT 2007
Hi,
dlls/gdiplus/brush.c | 29 +++++++++++++++++++++++++++++
dlls/gdiplus/gdiplus.spec | 4 ++--
dlls/gdiplus/gdiplus_private.h | 1 +
include/gdiplusflat.h | 2 ++
4 files changed, 34 insertions(+), 2 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index d9f06ad..1e08c42 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -114,6 +114,8 @@ GpStatus WINGDIPAPI GdipCreatePathGradie
(*grad)->centercolor = 0xffffffff;
(*grad)->wrap = wrap;
(*grad)->gamma = FALSE;
+ (*grad)->center.X = 0.0;
+ (*grad)->center.Y = 0.0;
return Ok;
}
@@ -154,6 +156,9 @@ GpStatus WINGDIPAPI GdipCreatePathGradie
(*grad)->centercolor = 0xffffffff;
(*grad)->wrap = WrapModeClamp;
(*grad)->gamma = FALSE;
+ /* FIXME: this should be set to the "centroid" of the path by default */
+ (*grad)->center.X = 0.0;
+ (*grad)->center.Y = 0.0;
return Ok;
}
@@ -208,6 +213,18 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBr
return Ok;
}
+GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient *grad,
+ GpPointF *point)
+{
+ if(!grad || !point)
+ return InvalidParameter;
+
+ point->X = grad->center.X;
+ point->Y = grad->center.Y;
+
+ return Ok;
+}
+
GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient *grad,
BOOL *gamma)
{
@@ -269,6 +286,18 @@ GpStatus WINGDIPAPI GdipSetPathGradientC
return Ok;
}
+GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint(GpPathGradient *grad,
+ GpPointF *point)
+{
+ if(!grad || !point)
+ return InvalidParameter;
+
+ grad->center.X = point->X;
+ grad->center.Y = point->Y;
+
+ return Ok;
+}
+
GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient *grad,
BOOL gamma)
{
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 01b67a5..80fe857 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -328,7 +328,7 @@
@ stub GdipGetPathGradientBlend
@ stub GdipGetPathGradientBlendCount
@ stub GdipGetPathGradientCenterColor
-@ stub GdipGetPathGradientCenterPoint
+@ stdcall GdipGetPathGradientCenterPoint(ptr ptr)
@ stub GdipGetPathGradientCenterPointI
@ stub GdipGetPathGradientFocusScales
@ stdcall GdipGetPathGradientGammaCorrection(ptr ptr)
@@ -550,7 +550,7 @@
@ stdcall GdipSetPathFillMode(ptr long)
@ stub GdipSetPathGradientBlend
@ stdcall GdipSetPathGradientCenterColor(ptr long)
-@ stub GdipSetPathGradientCenterPoint
+@ stdcall GdipSetPathGradientCenterPoint(ptr ptr)
@ stub GdipSetPathGradientCenterPointI
@ stub GdipSetPathGradientFocusScales
@ stdcall GdipSetPathGradientGammaCorrection(ptr long)
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index 599addb..553c6b2 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -98,6 +98,7 @@ struct GpPathGradient{
ARGB centercolor;
GpWrapMode wrap;
BOOL gamma;
+ GpPointF center;
};
struct GpPath{
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 35edfba..20d4ff9 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -94,6 +94,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradie
GpPathGradient**);
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
+GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*);
GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient*,BOOL*);
GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient*,INT*);
GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount(GpPathGradient*,
@@ -101,6 +102,7 @@ GpStatus WINGDIPAPI GdipGetPathGradientS
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*);
GpStatus WINGDIPAPI GdipGetSolidFillColor(GpSolidFill*,ARGB*);
GpStatus WINGDIPAPI GdipSetPathGradientCenterColor(GpPathGradient*,ARGB);
+GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint(GpPathGradient*,GpPointF*);
GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient*,BOOL);
GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient*,REAL,REAL);
GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient*,
--
1.4.1
More information about the wine-patches
mailing list