Simplicity
Simplicity

Reputation: 48916

Drawing a line in Python

I came across the following Python script:

x = x + 20  
y = 300 - int(i) 
draw_img.line((x,300) + (x,y), width=10, fill=(255,0,0,255))

The part which I couldn't understand is (x,300) + (x,y). What does using + here mean?

Thanks.

Upvotes: 0

Views: 607

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798666

It adds the (x, 300) tuple with the (x, y) tuple, resulting in (x, 300, x, y).

Upvotes: 3

Related Questions