gdiplus: Updated GdipDrawRectangleI.
This commit is contained in:
parent
bb904a2779
commit
c84c204b48
|
@ -1177,14 +1177,26 @@ GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x,
|
||||||
INT y, INT width, INT height)
|
INT y, INT width, INT height)
|
||||||
{
|
{
|
||||||
INT save_state;
|
INT save_state;
|
||||||
|
GpPointF ptf[4];
|
||||||
|
POINT pti[4];
|
||||||
|
|
||||||
if(!pen || !graphics)
|
if(!pen || !graphics)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
|
ptf[0].X = x;
|
||||||
|
ptf[0].Y = y;
|
||||||
|
ptf[1].X = x + width;
|
||||||
|
ptf[1].Y = y;
|
||||||
|
ptf[2].X = x + width;
|
||||||
|
ptf[2].Y = y + height;
|
||||||
|
ptf[3].X = x;
|
||||||
|
ptf[3].Y = y + height;
|
||||||
|
|
||||||
save_state = prepare_dc(graphics, pen);
|
save_state = prepare_dc(graphics, pen);
|
||||||
SelectObject(graphics->hdc, GetStockObject(NULL_BRUSH));
|
SelectObject(graphics->hdc, GetStockObject(NULL_BRUSH));
|
||||||
|
|
||||||
Rectangle(graphics->hdc, x, y, x + width, y + height);
|
transform_and_round_points(graphics, pti, ptf, 4);
|
||||||
|
Polygon(graphics->hdc, pti, 4);
|
||||||
|
|
||||||
restore_dc(graphics, save_state);
|
restore_dc(graphics, save_state);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue