gdiplus: Implement GdipGetClipBoundsI in terms of GdipGetClipBounds.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Shawn M. Chapla 2020-08-25 18:13:41 -04:00 committed by Alexandre Julliard
parent 5e40198862
commit 52fa4fb74e
2 changed files with 13 additions and 5 deletions

View File

@ -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,

View File

@ -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);