-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify that line() and polygon() include xy pixels #7142
Conversation
@@ -243,6 +243,7 @@ Methods | |||
.. py:method:: ImageDraw.line(xy, fill=None, width=0, joint=None) | |||
|
|||
Draws a line between the coordinates in the ``xy`` list. | |||
The coordinate pixels are included in the drawn line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a bit clearer?
The coordinate pixels are included in the drawn line. | |
The endpoint coordinate pixels are included in the drawn line. |
Or simply?
The coordinate pixels are included in the drawn line. | |
The endpoint pixels are included in the drawn line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to update it with any wording that you think is clearer, but both line()
and polygon()
accept a series of coordinates. I wonder if saying 'endpoint' implies it is only the first and last of those coordinates that are included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good point. Not sure now! Let's stick with the original :)
@@ -287,7 +288,7 @@ Methods | |||
|
|||
The polygon outline consists of straight lines between the given | |||
coordinates, plus a straight line between the last and the first | |||
coordinate. | |||
coordinate. The coordinate pixels are included in the drawn polygon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coordinate. The coordinate pixels are included in the drawn polygon. | |
coordinate. The endpoint coordinate pixels are included in the drawn polygon. |
coordinate. The coordinate pixels are included in the drawn polygon. | |
coordinate. The endpoint pixels are included in the drawn polygon. |
Resolves #367
#6625 documented that ImageDraw's
rectangle()
included the endpoints. This continues that clarification of the documentation forline()
andpolygon()
.As a demonstration, see the following code comparing the three functions.