java Programming Glossary: targetcolor
Flood fill using a stack http://stackoverflow.com/questions/2783204/flood-fill-using-a-stack my recursive code public void floodFill int x int y Color targetColor Color replacementColor if img.getRGB x y targetColor.getRGB.. Color targetColor Color replacementColor if img.getRGB x y targetColor.getRGB return img.setRGB x y replacementColor.getRGB floodFill.. img.setRGB x y replacementColor.getRGB floodFill x 1 y targetColor replacementColor floodFill x 1 y targetColor replacementColor..
Smoothing a jagged path http://stackoverflow.com/questions/7218309/smoothing-a-jagged-path null private JLabel labelOutline private JLabel targetColor private JSlider tolerance private JProgressBar progress private.. final JLabel originalLabel new JLabel new ImageIcon image targetColor new JLabel Target Color targetColor.setForeground Color.RED.. new ImageIcon image targetColor new JLabel Target Color targetColor.setForeground Color.RED targetColor.setBackground Color.WHITE..
Android flood-fill algorithm http://stackoverflow.com/questions/8070401/android-flood-fill-algorithm for me. private void FloodFill Bitmap bmp Point pt int targetColor int replacementColor Queue Point q new LinkedList Point q.add.. pt while q.size 0 Point n q.poll if bmp.getPixel n.x n.y targetColor continue Point w n e new Point n.x 1 n.y while w.x 0 bmp.getPixel.. w n e new Point n.x 1 n.y while w.x 0 bmp.getPixel w.x w.y targetColor bmp.setPixel w.x w.y replacementColor if w.y 0 bmp.getPixel..
|