慕村225694
static inline bool fillPoint_Gray( QImage &image, QPoint p, uchar low, uchar high, uchar newVal, QStack<QPoint> &stack){int x = p.rx();int y = p.ry();uchar *line = image.scanLine(y);if( line[x] < low || line[x] > high ){return false;}line[x] = newVal;if( y > 0 ){uchar *last = image.scanLine(y - 1);if( last[x] >= low && last[x] <= high ){stack.push(QPoint(x, y - 1));}