Skip to content
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

Negative dimensions will mirror rect() again #7363

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

martinleopold
Copy link
Contributor

Resolves #7353

Changes:

Fix a regression with negative values for width and/or height on rect(), ellipse(), and arc()

Screenshots of the change:

N/A

PR Checklist

Only applicable to shape mode `CORNER`
Fixes processing#7353
@martinleopold
Copy link
Contributor Author

This resolves the immediate issue by adjusting the position of the shape when using negative dimensions.
I'm wondering if we need to look into what happens with textured shapes. In this case the texture should actually be flipped i.e. properly mirrored, I guess?

@perminder-17 perminder-17 self-requested a review November 7, 2024 02:13
Copy link
Contributor

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Thank you so much for your hard work on this! I truly appreciate the effort you've put in. There is one potential issue I wanted to mention regarding texture image handling. While you’ve done a great job adjusting the positioning in CORNERS, CORNER, etc., it seems that the image itself isn’t being flipped when necessary—only the position is being shifted. Adding a flip where needed could enhance the solution. Please let us know if there’s any way we can assist in exploring or addressing this aspect.

Expected:

image

Your's:

image

@martinleopold
Copy link
Contributor Author

@perminder-17 Thanks for pointing that out, will look into it.

@martinleopold
Copy link
Contributor Author

martinleopold commented Nov 15, 2024

@perminder-17 I think my latest commit should restore the original behavior. This means that rect() will mirror, while ellipse() and arc() will NOT.

@martinleopold martinleopold changed the title Negative dimensions will flip shapes again Negative dimensions will mirror rect() again Nov 15, 2024
ellipse() and arc() use absolute values
@limzykenneth limzykenneth merged commit 4180fd1 into processing:main Nov 22, 2024
2 checks passed
@limzykenneth
Copy link
Member

@martinleopold Looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants