-
Notifications
You must be signed in to change notification settings - Fork 883
Rounding a stroked rectangle shifts its location #219
Comments
yep, that certainly look like a bug. thanks for reporting it. |
Some information that can help reduce the "where is this going wrong", it looks like with a numeric argument, placement is correct, so: this works
but this does not:
The source as is used will breaks in real Processing, as there is a call to @GABBAR1947 The rect function already filters on that |
The reason the implicit roundedRect is unexpectedly translated is due to a translate(0.5, 0.5), which, with a scale of 40, translates the rect 20 pixels over in each direction. https://github.com/processing-js/processing-js/blob/master/src/Processing.js#L8424-L8427 |
nice find! |
See the simple demonstrtion at https://www.khanacademy.org/computer-programming/wat3/6754888494743552
If you specify a fifth argument to rect, the location of the rendered rectangle is shifted, even when the value of the fifth argument is zero.
The text was updated successfully, but these errors were encountered: