/// <summary> /// Add a new pixel to the blob /// </summary> /// <param name="newPixel"></param> public bool AddPixel(Point newPixel, bool skipQueue = false) { if (!ContainsPixel(newPixel)) { if (!skipQueue) { FoundPixels.Enqueue(newPixel); } Pixels.Add(newPixel, newPixel); _center = null; boundsCalculated = false; return(true); } return(false); }
/// <summary> /// The next pixel to be checked for neighbors /// </summary> /// <returns></returns> public Point NextPixel() { return(FoundPixels.Dequeue()); }