Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void removeVPath(int[] path) {
- // show yellow flashes along the path
- for (int y = 0; y < sizeY(); y++) {
- component.bim.setRGB(path[y], y, 0xffffff00);
- }
- frame.repaint();
- // delete path from image
- BufferedImage newimage = new BufferedImage(sizeX() - 1, sizeY(), TYPE_INT_ARGB);
- for (int y = 0; y < sizeY(); y++) {
- for (int x = 0; x < sizeX() - 1; x++) {
- int xo = x + ((x >= path[y]) ? 1 : 0);
- newimage.setRGB(x, y, component.bim.getRGB(xo, y));
- }
- }
- component.bim = newimage;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement