We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I created a shape by combining various primitives in a group. However the group's origin is in the top left of the group. There is no problem doing translations but rotation and scaling take place around the top left of the shape which (as far as I can figure) makes it difficult to rotate shapes around a more central point. Is there a way in Processing to redefine a shape's (or any other object's) local coordinates or apply a local transformation matrix?
Answers
You're so close it hurts. Just translate your shape (-shape.width/2,-shape.height/2):
apply a local transformation matrix: https://processing.org/reference/translate_.html
redefine a shape's local coordinates: https://processing.org/reference/PShape_translate_.html (note -- persistent and cumulative!)