SetPixel(x,y,newvalue);//赋以新值 Boundaryfill(x,y-1,boundaryvalue,newvalue); //向四个方向扩散。 Boundaryfill(x,y+1,boundaryvalue,newvalue); Boundaryfill(x-1,y,boundaryvalue,newvalue); Boundaryfill(x+1,y,boundaryvalue,newvalue); { SetPixel(x,y,newvalue);//赋以新值 Boundaryfill(x,y-1,boundaryvalue,newvalue); //向四个方向扩散。 Boundaryfill(x,y+1,boundaryvalue,newvalue); Boundaryfill(x-1,y,boundaryvalue,newvalue); Boundaryfill(x+1,y,boundaryvalue,newvalue); } }