fillBox method

void fillBox(
  1. int x,
  2. int y,
  3. int width,
  4. int height, {
  5. bool value = true,
  6. bool antiAliased = true,
  7. Style? cellStyle,
})

Fills a rectangular box in sub-pixel coordinates.

Implementation

void fillBox(
  int x,
  int y,
  int width,
  int height, {
  bool value = true,
  bool antiAliased = true,
  Style? cellStyle,
}) {
  if (width <= 0 || height <= 0) return;
  for (var py = y; py < y + height; py++) {
    for (var px = x; px < x + width; px++) {
      setPixel(px, py, value, antiAliased: antiAliased, cellStyle: cellStyle);
    }
  }
}