Commit 430ce86a authored by Adam Petaccia's avatar Adam Petaccia Committed by Alexandre Julliard

gdiplus: Implement GdipGetRegionDataSize.

parent 2e086998
......@@ -267,9 +267,15 @@ GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *region, BYTE *buffer, UINT size,
GpStatus WINGDIPAPI GdipGetRegionDataSize(GpRegion *region, UINT *needed)
{
FIXME("(%p, %p): stub\n", region, needed);
if (!(region && needed))
return InvalidParameter;
return NotImplemented;
TRACE("%p, %p\n", region, needed);
/* header.size doesn't count header.size and header.checksum */
*needed = region->header.size + sizeof(DWORD) * 2;
return Ok;
}
GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hrgn)
......
......@@ -67,14 +67,17 @@ static void test_getregiondata(void)
status = GdipCreateRegion(&region);
ok(status == Ok, "status %08x\n", status);
todo_wine
{
status = GdipGetRegionDataSize(region, &needed);
ok(status == Ok, "status %08x\n", status);
expect(20, needed);
todo_wine
{
status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed);
ok(status == Ok, "status %08x\n", status);
}
expect(20, needed);
todo_wine
{
expect_dword(buf, 12);
trace("buf[1] = %08x\n", buf[1]);
expect_magic((DWORD*)(buf + 2));
......@@ -87,11 +90,15 @@ todo_wine
todo_wine
{
status = GdipGetRegionDataSize(region, &needed);
}
ok(status == Ok, "status %08x\n", status);
expect(20, needed);
status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed);
todo_wine
ok(status == Ok, "status %08x\n", status);
expect(20, needed);
todo_wine
{
expect_dword(buf, 12);
trace("buf[1] = %08x\n", buf[1]);
expect_magic((DWORD*)(buf + 2));
......@@ -102,13 +109,14 @@ todo_wine
status = GdipSetInfinite(region);
ok(status == Ok, "status %08x\n", status);
status = GdipGetRegionDataSize(region, &needed);
todo_wine
{
ok(status == Ok, "status %08x\n", status);
expect(20, needed);
status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed);
todo_wine
ok(status == Ok, "status %08x\n", status);
expect(20, needed);
todo_wine
{
expect_dword(buf, 12);
trace("buf[1] = %08x\n", buf[1]);
expect_magic((DWORD*)(buf + 2));
......
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