[19/19] gdiplus: updated GdipDrawRectangleI
Evan Stade
estade at gmail.com
Tue Aug 7 20:43:08 CDT 2007
Hi,
We can't use Rectangle() because of world transforms.
dlls/gdiplus/graphics.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 4c2385c..f282519 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1177,14 +1177,26 @@ GpStatus WINGDIPAPI GdipDrawRectangleI(G
INT y, INT width, INT height)
{
INT save_state;
+ GpPointF ptf[4];
+ POINT pti[4];
if(!pen || !graphics)
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);
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);
--
1.4.1
More information about the wine-patches
mailing list