22 uint16_t width = getWidth();
23 uint16_t height = getHeight();
24 uint16_t square_size = Math::min(width, height) / 2;
25 uint16_t start_x = (width - square_size) / 2;
26 uint16_t start_y = (height - square_size) / 2;
28 for (uint16_t x = 0; x < width; x++) {
29 for (uint16_t y = 0; y < height; y++) {
30 uint16_t idx = mXyMap.mapToIndex(x, y);
31 if (idx < mXyMap.getTotal()) {
32 if (x >= start_x && x < start_x + square_size &&
33 y >= start_y && y < start_y + square_size) {