fillRect method

void fillRect(
  1. int hdc,
  2. int color, {
  3. Rectangle<num>? rect,
  4. Pointer<RECT>? pRect,
})

Paint operation: fills a rectangle with color.

Implementation

void fillRect(int hdc, int color,
    {math.Rectangle? rect, Pointer<RECT>? pRect}) {
  var r = _resolveRect(rect, pRect);

  if (r != null) {
    final hBrush = CreateSolidBrush(color);
    FillRect(hdc, r, hBrush);
    DeleteObject(hBrush);
  }
}