isCellValid method

bool isCellValid(
  1. int x,
  2. int y
)

Whether cell (x, y) is valid and inside the current active clip bounds.

Implementation

bool isCellValid(int x, int y) {
  if (x < 0 || x >= width || y < 0 || y >= height) return false;
  if (_clipStack.isEmpty) return true;
  return _clipStack.last.contains(x, y);
}