Przemysław Białek : gdiplus: Implementation of function GdipDrawEllipse.
Alexandre Julliard
julliard at winehq.org
Fri Jun 27 07:42:08 CDT 2008
Module: wine
Branch: master
Commit: 864384e75d030ea3da0f396a8c081abeb544788d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=864384e75d030ea3da0f396a8c081abeb544788d
Author: Przemysław Białek <lobo at chello.pl>
Date: Fri Jun 27 10:59:23 2008 +0200
gdiplus: Implementation of function GdipDrawEllipse.
---
dlls/gdiplus/gdiplus.spec | 4 ++--
dlls/gdiplus/graphics.c | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 36db95e..7e127d7 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -170,8 +170,8 @@
@ stdcall GdipDrawCurve(ptr ptr ptr long)
@ stdcall GdipDrawCurveI(ptr ptr ptr long)
@ stub GdipDrawDriverString
-@ stub GdipDrawEllipse
-@ stub GdipDrawEllipseI
+@ stdcall GdipDrawEllipse(ptr ptr long long long long)
+@ stdcall GdipDrawEllipseI(ptr ptr long long long long)
@ stdcall GdipDrawImage(ptr ptr long long)
@ stub GdipDrawImageFX
@ stdcall GdipDrawImageI(ptr ptr long long)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 5716341..c274b2e 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1106,6 +1106,40 @@ GpStatus WINGDIPAPI GdipDrawCurve2I(GpGraphics *graphics, GpPen *pen,
return ret;
}
+GpStatus WINGDIPAPI GdipDrawEllipse(GpGraphics *graphics, GpPen *pen, REAL x,
+ REAL y, REAL width, REAL height)
+{
+ INT save_state;
+ GpPointF ptf[2];
+ POINT pti[2];
+
+ if(!graphics || !pen)
+ return InvalidParameter;
+
+ ptf[0].X = x;
+ ptf[0].Y = y;
+ ptf[1].X = x + width;
+ ptf[1].Y = y + height;
+
+ save_state = prepare_dc(graphics, pen);
+ SelectObject(graphics->hdc, GetStockObject(NULL_BRUSH));
+
+ transform_and_round_points(graphics, pti, ptf, 2);
+
+ Ellipse(graphics->hdc, pti[0].x, pti[0].y, pti[1].x, pti[1].y);
+
+ restore_dc(graphics, save_state);
+
+ return Ok;
+}
+
+GpStatus WINGDIPAPI GdipDrawEllipseI(GpGraphics *graphics, GpPen *pen, INT x,
+ INT y, INT width, INT height)
+{
+ return GdipDrawEllipse(graphics,pen,(REAL)x,(REAL)y,(REAL)width,(REAL)height);
+}
+
+
GpStatus WINGDIPAPI GdipDrawImage(GpGraphics *graphics, GpImage *image, REAL x, REAL y)
{
/* IPicture::Render uses LONG coords */
More information about the wine-cvs
mailing list