-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Bug with line joints #4579
Comments
Thanks for reporting this bug. I've created PR #4580 to resolve it. |
Hmm, the docs in full give examples of each:
The examples are a list of tuples and a list. In #3738 we decided not to support a list of lists. All combinations: [(x, y), (x, y), ...] # list of tuples ✅
[[x, y], [x, y], ...] # list of lists ❌
((x, y), (x, y), ...) # tuple of tuples ❓
([x, y], [x, y], ...) # tuple of lists ❌
[x, y, x, y, ...] # list ✅
(x, y, x, y, ...) # tuple ❓ I know it works for tuples (of values) when there's no Do we also support them for all other |
The key argument in #3738 for me is #3738 (comment)
This is now the opposite situation. Instead of clarifying that a coordinate is immutable, this is about clarifying that a list of coordinates is mutable. Whereas it's harder to imagine a scenario where a user has a mutable Tuples of values seem to work for the other ImageDraw methods. |
My opinion isn't worth much. But I tend to think that any iterable (that contains points or tuples of points) should be accepted. (under the principle of duck typing). |
Sounds reasonable, thanks both! |
What did you do?
When I use the
joint='curve'
attribute on the line method with a sequence of numeric value, I get an error.What did you expect to happen?
The documentation say that you can pass Sequence of either 2-tuples or numeric values.
So, this should work:
What actually happened?
Sequence of 2-tuples and
joint='curve'
works fine :Sequence of numeric values, but no
joint='curve'
works fine :Sequence of numeric values and
joint='curve'
doesn't work :What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: