See the Processing function rect():
        https://processing.org/reference/rect_.html

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