gdiplus: Implemented GdipIsEmptyClip with tests.
This commit is contained in:
parent
ff88d4e18e
commit
813d6dc537
|
@ -414,7 +414,7 @@
|
|||
@ stub GdipImageSetAbort
|
||||
@ stub GdipInitializePalette
|
||||
@ stdcall GdipInvertMatrix(ptr)
|
||||
@ stub GdipIsClipEmpty
|
||||
@ stdcall GdipIsClipEmpty(ptr ptr)
|
||||
@ stdcall GdipIsEmptyRegion(ptr ptr ptr)
|
||||
@ stdcall GdipIsEqualRegion(ptr ptr ptr ptr)
|
||||
@ stdcall GdipIsInfiniteRegion(ptr ptr ptr)
|
||||
|
|
|
@ -2392,6 +2392,14 @@ GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix
|
|||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipIsClipEmpty(GpGraphics *graphics, BOOL *res)
|
||||
{
|
||||
if(!graphics || !res)
|
||||
return InvalidParameter;
|
||||
|
||||
return GdipIsEmptyRegion(graphics->clip, graphics, res);
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
|
||||
GDIPCONST WCHAR* string, INT length, GDIPCONST GpFont* font,
|
||||
GDIPCONST RectF* layoutRect, GDIPCONST GpStringFormat *stringFormat,
|
||||
|
|
|
@ -844,6 +844,40 @@ static void test_get_set_clip(void)
|
|||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
||||
static void test_isempty(void)
|
||||
{
|
||||
GpStatus status;
|
||||
GpGraphics *graphics = NULL;
|
||||
HDC hdc = GetDC(0);
|
||||
GpRegion *clip;
|
||||
BOOL res;
|
||||
|
||||
status = GdipCreateFromHDC(hdc, &graphics);
|
||||
expect(Ok, status);
|
||||
|
||||
status = GdipCreateRegion(&clip);
|
||||
expect(Ok, status);
|
||||
|
||||
/* NULL */
|
||||
status = GdipIsClipEmpty(NULL, NULL);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipIsClipEmpty(graphics, NULL);
|
||||
expect(InvalidParameter, status);
|
||||
status = GdipIsClipEmpty(NULL, &res);
|
||||
expect(InvalidParameter, status);
|
||||
|
||||
/* default is infinite */
|
||||
res = TRUE;
|
||||
status = GdipIsClipEmpty(graphics, &res);
|
||||
expect(Ok, status);
|
||||
expect(FALSE, res);
|
||||
|
||||
GdipDeleteRegion(clip);
|
||||
|
||||
GdipDeleteGraphics(graphics);
|
||||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
||||
START_TEST(graphics)
|
||||
{
|
||||
struct GdiplusStartupInput gdiplusStartupInput;
|
||||
|
@ -866,6 +900,7 @@ START_TEST(graphics)
|
|||
test_Get_Release_DC();
|
||||
test_transformpoints();
|
||||
test_get_set_clip();
|
||||
test_isempty();
|
||||
|
||||
GdiplusShutdown(gdiplusToken);
|
||||
}
|
||||
|
|
|
@ -158,6 +158,7 @@ GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics*,CompositingMode*);
|
|||
GpStatus WINGDIPAPI GdipGetClip(GpGraphics*,GpRegion*);
|
||||
GpStatus WINGDIPAPI GdipSetClipRegion(GpGraphics*,GpRegion*,CombineMode);
|
||||
GpStatus WINGDIPAPI GdipResetClip(GpGraphics*);
|
||||
GpStatus WINGDIPAPI GdipIsClipEmpty(GpGraphics*, BOOL*);
|
||||
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*);
|
||||
GpStatus WINGDIPAPI GdipGetDC(GpGraphics*,HDC*);
|
||||
GpStatus WINGDIPAPI GdipGetImageDimension(GpImage*,REAL*,REAL*);
|
||||
|
|
Loading…
Reference in New Issue