-
-
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
Improved documentation of ImageDraw return values #6556
Conversation
Would it make sense for these to match the |
Also suggested in #6555, I think it would really help people upgrade by giving clear code examples of how to replace deprecations. Something along the lines of: # Deprecated:
width, height = textsize("Hello World")
# Use instead:
width = textlength("Hello World")
# Or:
left, top, right, bottom = textbbox((0,0), "Hello World")
width = right - left
height = bottom - top And on the deprecations page: And possibly in the release notes and deprecated functions' docstrings, or for brevity/avoid repetition, they could refer to the deprecations pages to see examples: |
Ok, I've pushed further commits to try and address both of those feedback items. |
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.
Looks good, thanks, just a suggestion to use Sphinx for cross-referencing.
https://docs.readthedocs.io/en/stable/guides/cross-referencing-with-sphinx.html
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
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.
Thanks!
@nulano Any more feedback?
I think it would be best to also mention anchors, but it would be worth first adding support for those in I'll put together a PR in a few days and include it with my suggestions for how to mention anchors. |
@nulano any updates? |
I did get the Python changes done, but did not have time to finish the tests before release. |
Resolves #6555