DrawRectangle method

void DrawRectangle(
  1. num posX,
  2. num posY,
  3. num width,
  4. num height,
  5. ColorD color,
)

Draw a color-filled rectangle

Implementation

void DrawRectangle(
  num posX,
  num posY,
  num width,
  num height,
  ColorD color,
) => run(
  () => _debugLabels.DrawRectangle(posX, posY, width, height, color),
  () => _flat.DrawRectangle(
    posX.toInt(),
    posY.toInt(),
    width.toInt(),
    height.toInt(),
    color,
  ),
);