public AsyncData(Bitmap masterImage, string masterName, Bitmap capturedImage, System.Threading.ManualResetEvent manualResetEvent, ImageComparisonSettings toleranceSettings, int index) { _manualResetEvent = manualResetEvent; _capturedImage = capturedImage; _masterImage = masterImage; _masterName = masterName; _result = new ImageComparisonResult(index, manualResetEvent); _toleranceSettings = toleranceSettings; }
static ImageComparisonSettings() { // HACK : get vscan default tolerance XmlDocument xmlDoc = new XmlDocument(); System.IO.Stream stream = null; try { // Vscan default tolerance lives in the same assembly as we are System.Reflection.Assembly self = System.Reflection.Assembly.GetExecutingAssembly(); stream = self.GetManifestResourceStream("Microsoft.Test.RenderingVerification.RenderingVerification.DefaultTolerance.xml"); if (stream == null) { // May occur if TestRuntime has been build with VS stream = self.GetManifestResourceStream("Code.Microsoft.Test.RenderingVerification.DefaultTolerance.xml"); } xmlDoc.Load(stream); } finally { if (stream != null) { stream.Dispose(); stream = null; } } _defaultToleranceNode = xmlDoc.DocumentElement; PixelizeFilter filter = new PixelizeFilter(); filter.SquareSize = 3; filter.ExtendedSize = 3; Default = new ImageComparisonSettings(_defaultToleranceNode, null, "Default"); IgnoreAntiAliasing = new ImageComparisonSettings(_defaultToleranceNode, filter, "IgnoreAntiAliasing"); }
public AsyncData(Bitmap masterImage, string masterName, Bitmap capturedImage, ImageComparisonSettings toleranceSettings, int index) : this(masterImage, masterName, capturedImage, null, toleranceSettings, index) { }