-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Fixing a broken stroke width for ZoomedScene #1073
Conversation
It fixes this issue #675 |
Additional clarifications: I understand that the author of this code fragment originally wanted to keep the thickness of the lines in ZoomedScene the same as in the original scene. First of all, I think that this is an unexpected behavior as it is normal to expect a thickening of lines when zooming objects. Secondly, the originally proposed hack does not work, because the width and height of the scenes in pixels are different, so simple multiplication by P.S. I would also like to point out that line 296 with |
I suggest, make it optional something like |
May be add |
This would be good, however, the current design does not allow this behavior to be easily implemented (with constant line width). Let's take a look at the reproducible example (rendered with a low quality config):
The main problem is that the zoomed display camera does not know the width and height of the main camera in pixels. So the ratio of |
The current solution, in which the stroke width is multiplied by Width constancy can be implemented. The correct solution is to multiply stroke width in zoomed camera by |
Sorry, but this seems outdated, so closed this. |
* Update PULL_REQUEST_TEMPLATE.md * Improved intro section * ENH: Model acronyms after NumPy * MNT: Fixed tense of thank you message * Removed mention of acronyms in PR titles * Update .github/PULL_REQUEST_TEMPLATE.md Co-authored-by: Benjamin Hackl <[email protected]> * Update .github/PULL_REQUEST_TEMPLATE.md Co-authored-by: Benjamin Hackl <[email protected]> * removed wikilink from changelog.rst Co-authored-by: Jason Villanueva <[email protected]> Co-authored-by: Benjamin Hackl <[email protected]>
When using ZoomedScene, incorrect stroke width behavior is observed.
I found that a special multiplier
self.get_frame_width() / FRAME_WIDTH
was added, which is supposed to keep the right stroke width. In fact, it introduces an incorrect behavior. See the example below:Reproducible example:
I understand that the author of this code fragment originally wanted to keep the thickness of the lines in ZoomedScene the same as in the original scene. First of all, I think that this is an unexpected behavior as it is normal to expect a thickening of lines when zooming objects. Secondly, the originally proposed hack does not work, because the width and height of the scenes in pixels are different, so simple multiplication by
self.get_frame_width() / FRAME_WIDTH
does not restore the original stroke width. If someone wants to keep this behavior, it should be made optional.