FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve rubberband rendering in wx and tk by oscargus · Pull Request #23985 · matplotlib/matplotlib · GitHub

Repository navigation

Improve rubberband rendering in wx and tk - #23985

Merged
tacaswell merged 3 commits into
matplotlib:mainfrom
oscargus:rubberband
Oct 20, 2022
Merged

tacaswell merged 3 commits into
matplotlib:mainfrom
oscargus:rubberband

Conversation

Copy link
Copy Markdown
Member

PR Summary

Closes #23969 (as there is a separate OSX issue #23777)

Draw a solid white rectangle and then add a dashed black rectangle so that it works on both light and dark backgrounds. For the tk backend it messes up the deprecated lastrect as bit since it only can contain one of the two rectangles. Not sure what lastrect is used for. If it is only to get the position it should be OK, but if it is to possibly modify the rectangle it may not work.

No obvious way to test it in the CI.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

oscargus added this to the v3.6.1 milestone Sep 22, 2022
QuLogic modified the milestones: v3.6.1, v3.6.2 Oct 6, 2022
[(x0, y0, x1, y0), (x1, y0, x1, y1),
(x0, y0, x0, y1), (x0, y1, x1, y1)],
wx.Pen('BLACK', 1, wx.PENSTYLE_SHORT_DASH))
x0, y0, x1, y1 = map(round, self._rubberband_rect)

oscargus Oct 15, 2022 •
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Earlier it was possible that the left and bottom bounds could be one pixel off as int truncates. Using round seems to improve the situation, at least based on practical tests.

tacaswell merged commit d099170 into matplotlib:main Oct 20, 2022

Copy link
Copy Markdown
Member

I manually tested tk.

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 20, 2022
QuLogic added a commit that referenced this pull request Oct 21, 2022
…985-on-v3.6.x

Backport PR #23985 on branch v3.6.x (Improve rubberband rendering in wx and tk)
oscargus deleted the rubberband branch October 22, 2022 05:51
ksunden mentioned this pull request Feb 20, 2023
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: Make rubber band more visible

4 participants


Back | FazBrowse Home | New Git URL