gdiplus: Add testing for ObjectBusy in some Graphics methods.
This commit is contained in:
parent
f8edb068e7
commit
8c096167d7
|
@ -2415,6 +2415,9 @@ GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics *graphics, GpRectF *rect)
|
|||
if(!graphics)
|
||||
return InvalidParameter;
|
||||
|
||||
if(graphics->busy)
|
||||
return ObjectBusy;
|
||||
|
||||
return GdipGetRegionBounds(graphics->clip, graphics, rect);
|
||||
}
|
||||
|
||||
|
@ -2428,6 +2431,9 @@ GpStatus WINGDIPAPI GdipGetClipBoundsI(GpGraphics *graphics, GpRect *rect)
|
|||
if(!graphics)
|
||||
return InvalidParameter;
|
||||
|
||||
if(graphics->busy)
|
||||
return ObjectBusy;
|
||||
|
||||
return GdipGetRegionBoundsI(graphics->clip, graphics, rect);
|
||||
}
|
||||
|
||||
|
@ -3378,6 +3384,9 @@ GpStatus WINGDIPAPI GdipTranslateClip(GpGraphics *graphics, REAL dx, REAL dy)
|
|||
if(!graphics)
|
||||
return InvalidParameter;
|
||||
|
||||
if(graphics->busy)
|
||||
return ObjectBusy;
|
||||
|
||||
return GdipTranslateRegion(graphics->clip, dx, dy);
|
||||
}
|
||||
|
||||
|
@ -3391,5 +3400,8 @@ GpStatus WINGDIPAPI GdipTranslateClipI(GpGraphics *graphics, INT dx, INT dy)
|
|||
if(!graphics)
|
||||
return InvalidParameter;
|
||||
|
||||
if(graphics->busy)
|
||||
return ObjectBusy;
|
||||
|
||||
return GdipTranslateRegion(graphics->clip, (REAL)dx, (REAL)dy);
|
||||
}
|
||||
|
|
|
@ -486,6 +486,7 @@ static void test_Get_Release_DC(void)
|
|||
INT i;
|
||||
BOOL res;
|
||||
ARGB color = 0x00000000;
|
||||
HRGN hrgn = CreateRectRgn(0, 0, 10, 10);
|
||||
|
||||
pt[0].X = 10;
|
||||
pt[0].Y = 10;
|
||||
|
@ -653,6 +654,10 @@ static void test_Get_Release_DC(void)
|
|||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipFlush(graphics, FlushIntentionFlush);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetClipBounds(graphics, rectf);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetClipBoundsI(graphics, rect);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetCompositingMode(graphics, &compmode);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipGetCompositingQuality(graphics, &quality);
|
||||
|
@ -711,6 +716,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 = GdipSetClipHrgn(graphics, hrgn, CombineModeReplace);
|
||||
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);
|
||||
|
@ -718,7 +725,11 @@ static void test_Get_Release_DC(void)
|
|||
status = GdipSetClipRectI(graphics, 0, 0, 10, 10, CombineModeReplace);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipSetClipRegion(graphics, clip, CombineModeReplace);
|
||||
expect(ObjectBusy, status);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipTranslateClip(graphics, 0.0, 0.0);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipTranslateClipI(graphics, 0, 0);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipDrawPolygon(graphics, pen, ptf, 5);
|
||||
expect(ObjectBusy, status); status = Ok;
|
||||
status = GdipDrawPolygonI(graphics, pen, pt, 5);
|
||||
|
@ -746,6 +757,7 @@ static void test_Get_Release_DC(void)
|
|||
GdipDeleteBrush((GpBrush*)brush);
|
||||
GdipDeleteRegion(region);
|
||||
GdipDeleteMatrix(m);
|
||||
DeleteObject(hrgn);
|
||||
|
||||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
|
|
@ -190,6 +190,8 @@ GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics*,GpBrush*,GDIPCONST GpRectF*,I
|
|||
GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics*,GpBrush*,GDIPCONST GpRect*,INT);
|
||||
GpStatus WINGDIPAPI GdipFillRegion(GpGraphics*,GpBrush*,GpRegion*);
|
||||
GpStatus WINGDIPAPI GdipGetClip(GpGraphics*,GpRegion*);
|
||||
GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics*,GpRectF*);
|
||||
GpStatus WINGDIPAPI GdipGetClipBoundsI(GpGraphics*,GpRect*);
|
||||
GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics*,CompositingMode*);
|
||||
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics*,CompositingQuality*);
|
||||
GpStatus WINGDIPAPI GdipGetDC(GpGraphics*,HDC*);
|
||||
|
@ -222,6 +224,7 @@ GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics*,GraphicsState);
|
|||
GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics*,REAL,GpMatrixOrder);
|
||||
GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*);
|
||||
GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder);
|
||||
GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics*,HRGN,CombineMode);
|
||||
GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics*,GpPath*,CombineMode);
|
||||
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics*,REAL,REAL,REAL,REAL,CombineMode);
|
||||
GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics*,INT,INT,INT,INT,CombineMode);
|
||||
|
@ -240,6 +243,8 @@ GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics*, GpCoordinateSpace, GpCoordi
|
|||
GpPointF *, INT);
|
||||
GpStatus WINGDIPAPI GdipTransformPointsI(GpGraphics*, GpCoordinateSpace, GpCoordinateSpace,
|
||||
GpPoint *, INT);
|
||||
GpStatus WINGDIPAPI GdipTranslateClip(GpGraphics*,REAL,REAL);
|
||||
GpStatus WINGDIPAPI GdipTranslateClipI(GpGraphics*,INT,INT);
|
||||
GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder);
|
||||
|
||||
/* GraphicsPath */
|
||||
|
|
Loading…
Reference in New Issue