Esempio n. 1
0
def rect(position, width, height, roundness):
    """Create a rectangle or rounded rectangle."""
    p = Path()
    if roundness == Point.ZERO:
        p.rect(position.x, position.y, width, height)
    else:
        p.roundedRect(position.x, position.y, width, height, roundness.x, roundness.y)
    return p