Commit 52fa4fb7 authored by Shawn M. Chapla's avatar Shawn M. Chapla Committed by Alexandre Julliard

gdiplus: Implement GdipGetClipBoundsI in terms of GdipGetClipBounds.

parent 5e401988
......@@ -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,
......
......@@ -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);
......
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