gdiplus: Test GdipCloneImage.
This commit is contained in:
parent
af29f96939
commit
de5b4d7c7f
|
@ -478,6 +478,35 @@ static void test_GdipGetImageFlags(void)
|
||||||
expect(InvalidParameter, stat);
|
expect(InvalidParameter, stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_GdipCloneImage(void)
|
||||||
|
{
|
||||||
|
GpStatus stat;
|
||||||
|
GpRectF rectF;
|
||||||
|
GpUnit unit;
|
||||||
|
GpBitmap *bm;
|
||||||
|
GpImage *image_src, *image_dest = NULL;
|
||||||
|
const INT WIDTH = 10, HEIGHT = 20;
|
||||||
|
|
||||||
|
/* Create an image, clone it, delete the original, make sure the copy works */
|
||||||
|
stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm);
|
||||||
|
expect(Ok, stat);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
image_src = ((GpImage*)bm);
|
||||||
|
stat = GdipCloneImage(image_src, &image_dest);
|
||||||
|
expect(Ok, stat);
|
||||||
|
}
|
||||||
|
stat = GdipDisposeImage((GpImage*)bm);
|
||||||
|
expect(Ok, stat);
|
||||||
|
todo_wine
|
||||||
|
{
|
||||||
|
stat = GdipGetImageBounds(image_dest, &rectF, &unit);
|
||||||
|
expect(Ok, stat);
|
||||||
|
stat = GdipDisposeImage(image_dest);
|
||||||
|
expect(Ok, stat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(image)
|
START_TEST(image)
|
||||||
{
|
{
|
||||||
struct GdiplusStartupInput gdiplusStartupInput;
|
struct GdiplusStartupInput gdiplusStartupInput;
|
||||||
|
@ -499,6 +528,7 @@ START_TEST(image)
|
||||||
test_LockBits();
|
test_LockBits();
|
||||||
test_GdipCreateBitmapFromHBITMAP();
|
test_GdipCreateBitmapFromHBITMAP();
|
||||||
test_GdipGetImageFlags();
|
test_GdipGetImageFlags();
|
||||||
|
test_GdipCloneImage();
|
||||||
|
|
||||||
GdiplusShutdown(gdiplusToken);
|
GdiplusShutdown(gdiplusToken);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue