fits property

bool get fits

Whether this region still fits the cached image.

Implementation

bool get fits {
  final image = this.image;
  final cell = this.cell;

  if (image.width % cell.x != 0 || image.height % cell.y != 0) return false;
  if (row >= image.height ~/ cell.y) return false;

  final columns = image.width ~/ cell.x;
  return (end ?? columns) <= columns;
}