From Fabian, 11 Years ago, written in C++.
Embed
  1. void RenderTarget::DrawRectangle(int x, int y, int w, int h, uint32 color)
  2.         {
  3.                 for (int i = 0; i <= w; i++){
  4.                         for (int j = 0; j <= h; j++){
  5.                                
  6.                                 SetPixel(x + w, y + h, color);
  7.                         }
  8.                 }
  9.  
  10.         }