svoid bwDrawRect(BWImage img, int x1, int y1, int w, int h, float color) { for y to h: { img.setPixel(x1, y1+y, color); img.setPixel(x1+w, y1+y, color); } for x to w: { img.setPixel(x1+x, y1, color); img.setPixel(x1+x, y1+h, color); } }