Signed-off-by: Shawn M. Chapla schapla@codeweavers.com --- dlls/gdiplus/graphics.c | 16 ++++++++++++---- dlls/gdiplus/tests/graphics.c | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index c3542b3d65d..5db8973c7b6 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4770,15 +4770,23 @@ GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics *graphics, GpRectF *rect) */ GpStatus WINGDIPAPI GdipGetClipBoundsI(GpGraphics *graphics, GpRect *rect) { + GpRectF rectf; + GpStatus stat; + TRACE("(%p, %p)\n", graphics, rect);
- if(!graphics) + if (!rect) return InvalidParameter;
- if(graphics->busy) - return ObjectBusy; + if ((stat = GdipGetClipBounds(graphics, &rectf)) == Ok) + { + rect->X = gdip_round(rectf.X); + rect->Y = gdip_round(rectf.Y); + rect->Width = gdip_round(rectf.Width); + rect->Height = gdip_round(rectf.Height); + }
- return GdipGetRegionBoundsI(graphics->clip, graphics, rect); + return stat; }
GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics *graphics, diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 38780d46865..1dbb0ae279f 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -5157,7 +5157,7 @@ static void test_clipping(void)
status = GdipGetClipBoundsI(graphics, &recti); expect(Ok, status); - todo_wine ok(recti.X == 45 && recti.Y == 20 && recti.Width == 50 && recti.Height == 25, + ok(recti.X == 45 && recti.Y == 20 && recti.Width == 50 && recti.Height == 25, "expected 45,20-50,25, got %i,%i-%i,%i\n", recti.X, recti.Y, recti.Width, recti.Height);
status = GdipSetEmpty(region);