getBackground method
Gets the background color at (x, y). Returns 0 if coordinates are out of bounds.
Implementation
@override
int getBackground(int x, int y) {
if (x < 0 || x >= bounds.width || y < 0 || y >= bounds.height) return 0;
return parent.getBackground(bounds.x + x, bounds.y + y);
}