Прошу прощение за отсутствие табуляции. Язык : Java
BufferedImage img = new BufferedImage(896, 896, BufferedImage.TYPE_INT_ARGB); Graphics2D graphics = (Graphics2D) img.getGraphics(); for (int x = 0; x <= img.getWidth(); x++) { for (int y = 0; y <= img.getHeight(); y++){ int r = (x ^ y) & 0xff; int g = (2*x ^ 2*y) & 0xff; int b = (4*x ^ 4*y) & 0xff; graphics.setColor(new Color(r, g, b)); graphics.fillRect(x, y, 1, 1); } }
Прошу прощение за отсутствие табуляции.
Язык : Java
BufferedImage img = new BufferedImage(896, 896, BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = (Graphics2D) img.getGraphics();
for (int x = 0; x <= img.getWidth(); x++) {
for (int y = 0; y <= img.getHeight(); y++){
int r = (x ^ y) & 0xff;
int g = (2*x ^ 2*y) & 0xff;
int b = (4*x ^ 4*y) & 0xff;
graphics.setColor(new Color(r, g, b));
graphics.fillRect(x, y, 1, 1);
}
}