getBackground method

  1. @override
int getBackground(
  1. int x,
  2. int y
)
override

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);
}