public void GrabPointsTest9() { DrawingSpaceViewModel model = new DrawingSpaceViewModel(); Point[] points = GetDataFromImage.GetNormalizedPoints(31, 10, -21, -50); Assert.IsTrue(points.Length > 0); }
public void Action(IImageData recievedData) { int previousX = recievedData.PreviousX; int previousY = recievedData.PreviousY; Color[,] colors = recievedData.Colors; Color currentColor = recievedData.CurrentColor; GetDataFromImage.GetNormalizedPoints(recievedData.MouseElement, recievedData.PixelsWide, recievedData.PixelsHigh, recievedData.SizeOfPixel, out int y, out int x); if (x != previousX || y != previousY && colors[y, x] != currentColor) { if (previousX == -1) { previousX = x; previousY = y; } Point[] points = DrawLine(previousX, previousY, x, y); foreach (Point savePoint in points) { colors[(int)savePoint.Y, (int)savePoint.X] = currentColor; } recievedData.Colors = colors; } }
public void TestGetSerialNumber() { GetDataFromImage data = new GetDataFromImage(); string sn = data.GetSerialNumber(); Assert.NotNull(sn); Assert.Equal("803MAPN5L200", sn); }
public void Action(IImageData recievedData) { GetDataFromImage.GetNormalizedPoints(recievedData.MouseElement, recievedData.PixelsWide, recievedData.PixelsHigh, recievedData.SizeOfPixel, out int x, out int y); recievedData.CurrentColor = recievedData.Colors[x, y]; }
public void Action(IImageData recievedData) { Color[,] colors = recievedData.Colors; Color currentColor = recievedData.CurrentColor; GetDataFromImage.GetNormalizedPoints(recievedData.MouseElement, recievedData.PixelsWide, recievedData.PixelsHigh, recievedData.SizeOfPixel, out int y, out int x); if (colors[y, x] != currentColor) { Point[] pointsToFill = PointsGrabber.GrabPointsWithinFuzzValue(colors, x, y); foreach (Point point in pointsToFill.ToList()) { colors[(int)point.Y, (int)point.X] = currentColor; } recievedData.Colors = colors; } }