gdiplus: Implement GdipGetRegionHRgn for infinite regions.
This commit is contained in:
parent
5c75277784
commit
74d62bccab
|
@ -768,18 +768,31 @@ GpStatus WINGDIPAPI GdipGetRegionDataSize(GpRegion *region, UINT *needed)
|
||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GpStatus get_region_hrgn(struct region_element *element, GpGraphics *graphics, HRGN *hrgn)
|
||||||
|
{
|
||||||
|
switch (element->type)
|
||||||
|
{
|
||||||
|
case RegionDataInfiniteRect:
|
||||||
|
*hrgn = NULL;
|
||||||
|
return Ok;
|
||||||
|
default:
|
||||||
|
FIXME("GdipGetRegionHRgn unimplemented for region type=%x\n", element->type);
|
||||||
|
*hrgn = NULL;
|
||||||
|
return NotImplemented;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* GdipGetRegionHRgn [GDIPLUS.@]
|
* GdipGetRegionHRgn [GDIPLUS.@]
|
||||||
*/
|
*/
|
||||||
GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hrgn)
|
GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hrgn)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %p, %p): stub\n", region, graphics, hrgn);
|
TRACE("(%p, %p, %p)\n", region, graphics, hrgn);
|
||||||
|
|
||||||
if (!region || !hrgn)
|
if (!region || !hrgn)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
*hrgn = NULL;
|
return get_region_hrgn(®ion->node, graphics, hrgn);
|
||||||
return NotImplemented;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics, BOOL *res)
|
GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics, BOOL *res)
|
||||||
|
|
|
@ -762,14 +762,14 @@ static void test_gethrgn(void)
|
||||||
status = GdipGetRegionHRgn(region, graphics, NULL);
|
status = GdipGetRegionHRgn(region, graphics, NULL);
|
||||||
ok(status == InvalidParameter, "status %08x\n", status);
|
ok(status == InvalidParameter, "status %08x\n", status);
|
||||||
|
|
||||||
hrgn = NULL;
|
|
||||||
status = GdipGetRegionHRgn(region, NULL, &hrgn);
|
status = GdipGetRegionHRgn(region, NULL, &hrgn);
|
||||||
todo_wine ok(status == Ok, "status %08x\n", status);
|
ok(status == Ok, "status %08x\n", status);
|
||||||
|
ok(hrgn == NULL, "hrgn=%p\n", hrgn);
|
||||||
DeleteObject(hrgn);
|
DeleteObject(hrgn);
|
||||||
|
|
||||||
hrgn = NULL;
|
|
||||||
status = GdipGetRegionHRgn(region, graphics, &hrgn);
|
status = GdipGetRegionHRgn(region, graphics, &hrgn);
|
||||||
todo_wine ok(status == Ok, "status %08x\n", status);
|
ok(status == Ok, "status %08x\n", status);
|
||||||
|
ok(hrgn == NULL, "hrgn=%p\n", hrgn);
|
||||||
DeleteObject(hrgn);
|
DeleteObject(hrgn);
|
||||||
|
|
||||||
status = GdipDeleteRegion(region);
|
status = GdipDeleteRegion(region);
|
||||||
|
|
Loading…
Reference in New Issue