-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
error when ellipse has negative width and height #413
Comments
I've already more or less reported about that in:
I had to use abs() before passing the argument. That is true for both P5.JS & Processing.JS! |
… now no longer throws an error when negative sizes are specified. processing#413
fixed with https://github.com/lmccart/p5.js/pull/416 |
Unfortunately, that https://github.com/lmccart/p5.js/pull/416 fix doesn't extend the same principle to rect() & arc()! 😔 |
@GoToLoop rect already supports this |
I fail to spot any Math.abs() upon "width" & "height" parameters before calling canvas.modeAdjust() in rect()! And from the P5.JS's reference page, rect() w/ negative dimensions is still bugged! |
The following:
produces:
I'm not sure what the proper behavior should be since this isn't really valid code, but Processing I believe draws the ellipse with the absolute value of the negative values (inverted?).
The behavior for
rect(100,100,-50,-50)
for example draws the rectangle, but inverted (i.e. pointing up and to the left).The text was updated successfully, but these errors were encountered: