/** * Rotate all pixels. */ private void rotate() { int[] newpixels = new int[width * height]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { newpixels[y * width + x] = rotatedPixel(x, y); } } raster = newpixels; }
/** * Rotate all pixels. */ private void rotate() { int[] newpixels = new int[width * height]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { newpixels[y * width + x] = rotatedPixel(x, y); } } raster = newpixels; }