Commit 03b6c5e8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: GdipGetImageFlags simple stub with test.

parent 388caf32
......@@ -286,7 +286,7 @@
@ stdcall GdipGetImageDimension(ptr ptr ptr)
@ stdcall GdipGetImageEncoders(long long ptr)
@ stdcall GdipGetImageEncodersSize(ptr ptr)
@ stub GdipGetImageFlags
@ stdcall GdipGetImageFlags(ptr ptr)
@ stdcall GdipGetImageGraphicsContext(ptr ptr)
@ stdcall GdipGetImageHeight(ptr ptr)
@ stdcall GdipGetImageHorizontalResolution(ptr ptr)
......
......@@ -149,6 +149,7 @@ struct GpCustomLineCap{
struct GpImage{
IPicture* picture;
ImageType type;
UINT flags;
};
struct GpMetafile{
......
......@@ -384,6 +384,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
}
(*bitmap)->image.type = ImageTypeBitmap;
(*bitmap)->image.flags = ImageFlagsNone;
(*bitmap)->width = width;
(*bitmap)->height = height;
(*bitmap)->format = format;
......@@ -789,6 +790,7 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image)
}
(*image)->picture = pic;
(*image)->flags = ImageFlagsNone;
return Ok;
}
......@@ -1108,3 +1110,13 @@ GpStatus WINGDIPAPI GdipSetEffectParameters(CGpEffect *effect,
return NotImplemented;
}
GpStatus WINGDIPAPI GdipGetImageFlags(GpImage *image, UINT *flags)
{
if(!image || !flags)
return InvalidParameter;
*flags = image->flags;
return Ok;
}
......@@ -417,6 +417,24 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
GlobalFree(hbm);
}
static void test_GdipGetImageFlags(void)
{
GpImage *img;
GpStatus stat;
UINT flags;
img = (GpImage*)0xdeadbeef;
stat = GdipGetImageFlags(NULL, NULL);
expect(InvalidParameter, stat);
stat = GdipGetImageFlags(NULL, &flags);
expect(InvalidParameter, stat);
stat = GdipGetImageFlags(img, NULL);
expect(InvalidParameter, stat);
}
START_TEST(image)
{
struct GdiplusStartupInput gdiplusStartupInput;
......@@ -436,6 +454,7 @@ START_TEST(image)
test_encoders();
test_LockBits();
test_GdipCreateBitmapFromHBITMAP();
test_GdipGetImageFlags();
GdiplusShutdown(gdiplusToken);
}
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