Closed as duplicate
Description
Most appropriate sub-area of Processing 4?
PDE, Core/Environment/Rendering
Processing version
4.3.2
Operating system
Windows
Steps to reproduce this
reported:Duplicate method settings() in type test why?
snippet
// Paste your code below :)
PImage img;
int[][] tilesX, tilesY;
int tileSize = 50;
void settings() {
size(displayWidth, displayHeight);
}
void setup() {
smooth();
img = loadImage("1.jpg");
int cols = (int) ceil(displayWidth / (float) tileSize);
int rows = (int) ceil(displayHeight / (float) tileSize);
tilesX = new int[cols][rows];
tilesY = new int[cols][rows];
for (int i = 0; i < cols; i++) {
for (int j = 0; j < rows; j++) {
tilesX[i][j] = i * tileSize;
tilesY[i][j] = j * tileSize;
}
}
}
void draw() {
background(255);
int mouseXTile = (int) floor(mouseX / (float) tileSize);
int mouseYTile = (int) floor(mouseY / (float) tileSize);
image(img, mouseXTile * tileSize, mouseYTile * tileSize,
tileSize, tileSize,
mouseXTile * tileSize, mouseYTile * tileSize,
tileSize, tileSize);
}
### Additional context
_No response_
### Would you like to work on the issue?
yes