Point p; s.push(Point(xy);//种子象素入栈 while(!s.isempty() p=spop0;//栈顶象素出栈 X-p.X; y-p.y; SetPixel(x,y ,newvalue); x0=X+1; while(GetPixel(x0,y)!=boundaryvalue)// 填充右方象素Point p; s.push(Point(x,y));//种子象素入栈 while(!s.isempty()) { p=s.pop(); //栈顶象素出栈 x=p.x; y=p.y; SetPixel(x ,y ,newvalue); x0= x+1; while(GetPixel(x0,y)!=boundaryvalue)// 填充右方象素