ImageComparer.Compare – metoda (Image, Image, List<ToleranceRectangle>, Image%)
Porovnává konkrétní oblasti podle oblasti určené tolerance obdélníky dva obrazy.
Vrátí hodnotu true Pokud obrázek rozdíl je v rámci tolerance a vypočítá rozpětí, podle které tolerance při vynechání jako obraz změn.
Obor názvů: Microsoft.VisualStudio.TestTools.UITesting
Sestavení: Microsoft.VisualStudio.TestTools.UITesting (v Microsoft.VisualStudio.TestTools.UITesting.dll)
Syntaxe
'Deklarace
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
Parametry
- actualImage
Typ: System.Drawing.Image
Vlastní obraz.
- expectedImage
Typ: System.Drawing.Image
Očekávané obrazu.
- rectangleList
Typ: System.Collections.Generic.List<ToleranceRectangle>
Seznam tolerance obdélníky označující oblast porovnat a tolerance hodnota.
- diffImage
Typ: System.Drawing.Image%
Obraz, jehož argb hodnoty představují rozpětí, kterým byl proveden tolerance.
Vrácená hodnota
Typ: System.Boolean
PRAVDA, pokud splňují dva obrazy v obdélnících tolerance zadané hodnoty.
Zabezpečení rozhraní .NET Framework
- Plná důvěra přímému volajícímu. Částečně zabezpečený kód nemůže tento člen použít. Další informace naleznete v tématu Používání knihoven z částečně důvěryhodného kódu.