| java Programming Glossary: replacementcolorFlood fill using a stack http://stackoverflow.com/questions/2783204/flood-fill-using-a-stack  public void floodFill int x int y Color targetColor Color replacementColor if img.getRGB x y targetColor.getRGB return img.setRGB x y replacementColor.getRGB.. if img.getRGB x y targetColor.getRGB return img.setRGB x y replacementColor.getRGB floodFill x 1 y targetColor replacementColor floodFill.. x y replacementColor.getRGB floodFill x 1 y targetColor replacementColor floodFill x 1 y targetColor replacementColor floodFill x y 1.. 
 Android flood-fill algorithm http://stackoverflow.com/questions/8070401/android-flood-fill-algorithm  void FloodFill Bitmap bmp Point pt int targetColor int replacementColor Queue Point q new LinkedList Point q.add pt while q.size 0 Point.. 0 bmp.getPixel w.x w.y targetColor  bmp.setPixel w.x w.y replacementColor if w.y 0 bmp.getPixel w.x w.y 1 targetColor  q.add new Point.. 1  bmp.getPixel e.x e.y targetColor  bmp.setPixel e.x e.y replacementColor if e.y 0 bmp.getPixel e.x e.y 1 targetColor  q.add new Point.. 
 |