由、矩形的区域指定比较两个图像的特定区域。
返回 true,则图像区别在容差内,并且计算、丢失的差异作为图像边距。
命名空间: Microsoft.VisualStudio.TestTools.UITesting
程序集: Microsoft.VisualStudio.TestTools.UITesting(在 Microsoft.VisualStudio.TestTools.UITesting.dll 中)
语法
声明
Public Shared Function Compare ( _
actualImage As Image, _
expectedImage As Image, _
rectangleList As List(Of ToleranceRectangle), _
<OutAttribute> ByRef diffImage As Image _
) As Boolean
public static bool Compare(
Image actualImage,
Image expectedImage,
List<ToleranceRectangle> rectangleList,
out Image diffImage
)
public:
static bool Compare(
Image^ actualImage,
Image^ expectedImage,
List<ToleranceRectangle>^ rectangleList,
[OutAttribute] Image^% diffImage
)
static member Compare :
actualImage:Image *
expectedImage:Image *
rectangleList:List<ToleranceRectangle> *
diffImage:Image byref -> bool
public static function Compare(
actualImage : Image,
expectedImage : Image,
rectangleList : List<ToleranceRectangle>,
diffImage : Image
) : boolean
参数
actualImage
类型:Image实际图像。
expectedImage
类型:Image预期的图像。
rectangleList
类型:List<ToleranceRectangle>容差矩形列表指示比较和容错值区域。
diffImage
类型:Image%argb 值的图像表示、丢失的边距。
返回值
类型:Boolean
如果两个图像满足在公差矩形中指定的值,则为 true。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。