}//CheckRange操作 protected int FindXLeft(Int16Double p) { int xleft = p.X - 1; while (true) { if (xleft == -1 || flagsMap.GetFlagOn(xleft, p.Y)) { break; } else { byte value = bmp.GetPixel(xleft, p.Y); if (IncludePredicate(xleft, p.Y)) { Int16Double t = new Int16Double(xleft, p.Y); flagsMap.SetFlagOn(xleft, p.Y, true); Process(t); xleft--; } else { break; } } } return(xleft + 1); }//FindXLeft操作
protected bool IncludePredicate(Int16Double p) { return(bmp.GetPixel(p.X, p.Y) == BitMap2d.WHITE); }
bool IncludePredicate(int x, int y) { byte value = bmp.GetPixel(x, y); return(value == 255); }