code: def rect(self, x, y, width, height, color):
          
          self.context.set_source_rgb(*color)
          self.context.rectangle(self.tx(x), self.ty(y), self.tx(width), self.ty(height))
          self.context.fill()
docs: See the Processing function rect():
          https://processing.org/reference/rect_.html