Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve rubberband rendering in wx and tk#23985

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 3 commits intomatplotlib:mainfromoscargus:rubberband
Oct 20, 2022

Conversation

oscargus
Copy link
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 deprecatedlastrect as bit since it only can contain one of the two rectangles. Not sure whatlastrect 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 (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

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

[(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)
Copy link
MemberAuthor

@oscargusoscargusOct 15, 2022
edited
Loading

Choose a reason for hiding this comment

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

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

@tacaswelltacaswell merged commitd099170 intomatplotlib:mainOct 20, 2022
@tacaswell
Copy link
Member

I manually tested tk.

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestOct 20, 2022
QuLogic added a commit that referenced this pull requestOct 21, 2022
…985-on-v3.6.xBackport PR#23985 on branch v3.6.x (Improve rubberband rendering in wx and tk)
@oscargusoscargus deleted the rubberband branchOctober 22, 2022 05:51
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.2
Development

Successfully merging this pull request may close these issues.

[ENH]: Make rubber band more visible
4 participants
@oscargus@tacaswell@timhoffm@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp