gdiplus: Stub implementation of GdipImageGetFrameDimensionsCount + test.

This commit is contained in:
Petr Dlouhý 2008-06-19 10:38:09 +02:00 committed by Alexandre Julliard
parent 30e6b81dd1
commit 4513fb3818
4 changed files with 42 additions and 1 deletions

View File

@ -407,7 +407,7 @@
@ stub GdipGraphicsSetAbort
@ stub GdipImageForceValidation
@ stdcall GdipImageGetFrameCount(ptr ptr ptr)
@ stub GdipImageGetFrameDimensionsCount
@ stdcall GdipImageGetFrameDimensionsCount(ptr ptr)
@ stdcall GdipImageGetFrameDimensionsList(ptr ptr long)
@ stub GdipImageRotateFlip
@ stdcall GdipImageSelectActiveFrame(ptr ptr long)

View File

@ -688,6 +688,19 @@ GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
return NotImplemented;
}
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image,
UINT* count)
{
if(!image || !count)
return InvalidParameter;
*count = 1;
FIXME("stub\n");
return Ok;
}
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage* image,
GUID* dimensionIDs, UINT count)
{

View File

@ -106,6 +106,32 @@ static void test_GetImageDimension(void)
GdipDisposeImage((GpImage*)bm);
}
static void test_GdipImageGetFrameDimensionsCount(void)
{
GpBitmap *bm;
GpStatus stat;
const REAL WIDTH = 10.0, HEIGHT = 20.0;
UINT w;
bm = (GpBitmap*)0xdeadbeef;
stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB,NULL, &bm);
expect(Ok,stat);
ok((GpBitmap*)0xdeadbeef != bm, "Expected bitmap to not be 0xdeadbeef\n");
ok(NULL != bm, "Expected bitmap to not be NULL\n");
stat = GdipImageGetFrameDimensionsCount(NULL,&w);
expect(InvalidParameter, stat);
stat = GdipImageGetFrameDimensionsCount((GpImage*)bm,NULL);
expect(InvalidParameter, stat);
w = -1;
stat = GdipImageGetFrameDimensionsCount((GpImage*)bm,&w);
expect(Ok, stat);
expect(1, w);
GdipDisposeImage((GpImage*)bm);
}
static void test_LoadingImages(void)
{
GpStatus stat;
@ -466,6 +492,7 @@ START_TEST(image)
test_Scan0();
test_GetImageDimension();
test_GdipImageGetFrameDimensionsCount();
test_LoadingImages();
test_SavingImages();
test_encoders();

View File

@ -318,6 +318,7 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromStream(IStream*,MetafileHeader*);
GpStatus WINGDIPAPI GdipGetMetafileHeaderFromWmf(HMETAFILE,GDIPCONST WmfPlaceableFileHeader*,MetafileHeader*);
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*);
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*);
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage*,UINT*);
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage*,GUID*,UINT);
GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage*,GDIPCONST GUID*,UINT);
GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR*,GpImage**);