Nikolay Sivov : gdiplus: Implemented GdipFillEllipse/GdipFillEllipseI.
Alexandre Julliard
julliard at winehq.org
Tue Apr 29 08:54:39 CDT 2008
Module: wine
Branch: master
Commit: fc2dc8bc2a81275c713f5014d3f9da2e13cb1811
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc2dc8bc2a81275c713f5014d3f9da2e13cb1811
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Tue Apr 29 00:10:10 2008 +0400
gdiplus: Implemented GdipFillEllipse/GdipFillEllipseI.
---
dlls/gdiplus/gdiplus.spec | 4 ++--
dlls/gdiplus/graphics.c | 35 +++++++++++++++++++++++++++++++++++
include/gdiplusflat.h | 2 ++
3 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 2a3aa8a..c6a57a4 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -217,8 +217,8 @@
@ stub GdipFillClosedCurve2I
@ stub GdipFillClosedCurve
@ stub GdipFillClosedCurveI
-@ stub GdipFillEllipse
-@ stub GdipFillEllipseI
+@ stdcall GdipFillEllipse(ptr ptr long long long long)
+@ stdcall GdipFillEllipseI(ptr ptr long long long long)
@ stdcall GdipFillPath(ptr ptr ptr)
@ stdcall GdipFillPie(ptr ptr long long long long long long)
@ stdcall GdipFillPieI(ptr ptr long long long long long long)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 4982c84..1cba138 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1682,6 +1682,41 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
return Ok;
}
+GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics *graphics, GpBrush *brush, REAL x,
+ REAL y, REAL width, REAL height)
+{
+ INT save_state;
+ GpPointF ptf[2];
+ POINT pti[2];
+
+ if(!graphics || !brush)
+ return InvalidParameter;
+
+ ptf[0].X = x;
+ ptf[0].Y = y;
+ ptf[1].X = x + width;
+ ptf[1].Y = y + height;
+
+ save_state = SaveDC(graphics->hdc);
+ EndPath(graphics->hdc);
+ SelectObject(graphics->hdc, brush->gdibrush);
+ SelectObject(graphics->hdc, GetStockObject(NULL_PEN));
+
+ transform_and_round_points(graphics, pti, ptf, 2);
+
+ Ellipse(graphics->hdc, pti[0].x, pti[0].y, pti[1].x, pti[1].y);
+
+ RestoreDC(graphics->hdc, save_state);
+
+ return Ok;
+}
+
+GpStatus WINGDIPAPI GdipFillEllipseI(GpGraphics *graphics, GpBrush *brush, INT x,
+ INT y, INT width, INT height)
+{
+ return GdipFillEllipse(graphics,brush,(REAL)x,(REAL)y,(REAL)width,(REAL)height);
+}
+
GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path)
{
INT save_state;
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 73bf7c0..244656f 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -106,6 +106,8 @@ GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics*,GpPen*,GDIPCONST GpRect*,INT
GpStatus WINGDIPAPI GdipDrawString(GpGraphics*,GDIPCONST WCHAR*,INT,
GDIPCONST GpFont*,GDIPCONST RectF*, GDIPCONST GpStringFormat*,
GDIPCONST GpBrush*);
+GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL);
+GpStatus WINGDIPAPI GdipFillEllipseI(GpGraphics*,GpBrush*,INT,INT,INT,INT);
GpStatus WINGDIPAPI GdipFillPath(GpGraphics*,GpBrush*,GpPath*);
GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipFillPieI(GpGraphics*,GpBrush*,INT,INT,INT,INT,REAL,REAL);
More information about the wine-cvs
mailing list