from PIL import Image, ImageDraw
# Create an image with a white background
width, height = 600, 400
image = Image.new("RGB", (width, height), "white")
draw = ImageDraw.Draw(image)
# Define positions for the components
positions = {
"A": (50, 50),
"B": (50, 150),
"Sumador1": (200, 100),
"Complementor": (150, 150),
"Control": (50, 250),
"Output": (400, 100),
}
# Draw components
draw.rectangle([(positions["A"]), (positions["A"][0] + 80, positions["A"][1] + 30)], outline = "black")
draw.text((positions["A"][0] + 10, positions["A"][1] + 5), "Input A", fill = "black")
draw.rectangle([(positions["B"]), (positions["B"][0] + 80, positions["B"][1] + 30)], outline = "black")