Commit e2817e59 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Implemented GdipSetClipPath.

parent cc5ff833
......@@ -508,7 +508,7 @@
@ stdcall GdipSetAdjustableArrowCapWidth(ptr long)
@ stub GdipSetClipGraphics
@ stub GdipSetClipHrgn
@ stub GdipSetClipPath
@ stdcall GdipSetClipPath(ptr ptr long)
@ stdcall GdipSetClipRect(ptr long long long long long)
@ stdcall GdipSetClipRectI(ptr long long long long long)
@ stdcall GdipSetClipRegion(ptr ptr long)
......
......@@ -2948,6 +2948,19 @@ GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx,
return GdipTranslateMatrix(graphics->worldtrans, dx, dy, order);
}
GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics *graphics, GpPath *path, CombineMode mode)
{
TRACE("(%p, %p, %d)\n", graphics, path, mode);
if(!graphics)
return InvalidParameter;
if(graphics->busy)
return ObjectBusy;
return GdipCombineRegionPath(graphics->clip, path, mode);
}
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y,
REAL width, REAL height,
CombineMode mode)
......
......@@ -706,6 +706,8 @@ static void test_Get_Release_DC(void)
expect(ObjectBusy, status); status = Ok;
status = GdipTranslateWorldTransform(graphics, 0.0, 0.0, MatrixOrderPrepend);
expect(ObjectBusy, status); status = Ok;
status = GdipSetClipPath(graphics, path, CombineModeReplace);
expect(ObjectBusy, status); status = Ok;
status = GdipSetClipRect(graphics, 0.0, 0.0, 10.0, 10.0, CombineModeReplace);
expect(ObjectBusy, status); status = Ok;
status = GdipSetClipRectI(graphics, 0, 0, 10, 10, CombineModeReplace);
......@@ -804,6 +806,11 @@ static void test_get_set_clip(void)
status = GdipSetClipRegion(graphics, NULL, CombineModeReplace);
expect(InvalidParameter, status);
status = GdipSetClipPath(NULL, NULL, CombineModeReplace);
expect(InvalidParameter, status);
status = GdipSetClipPath(graphics, NULL, CombineModeReplace);
expect(InvalidParameter, status);
res = FALSE;
status = GdipGetClip(graphics, clip);
expect(Ok, status);
......
......@@ -533,6 +533,7 @@ GpStatus WINGDIPAPI GdipTranslateRegionI(GpRegion *, INT, INT);
GpStatus WINGDIPAPI GdipFlush(GpGraphics*, GpFlushIntention);
GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile*,UINT);
GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics*,GpPath*,CombineMode);
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics*,REAL,REAL,REAL,REAL,CombineMode);
GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics*,INT,INT,INT,INT,CombineMode);
GpStatus WINGDIPAPI GdipFillRegion(GpGraphics*,GpBrush*,GpRegion*);
......
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