Commit 864384e7 authored by Przemysław Białek's avatar Przemysław Białek Committed by Alexandre Julliard

gdiplus: Implementation of function GdipDrawEllipse.

parent ce81d843
......@@ -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)
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment