No matter what angle you use to rotate the group containing the rectangle, the positioning of the rectangle inside its group is unchanged as expected.
This mean that the position of the rectangle after rotation in canvas-relative units must be calculated using the angle and the internal group parameters. But how?
When the group is not rotated, the position is calculated as nicely explained here: How to get the canvas-relative position of an object that is in a group?.
I have seen mentioned a few times that you can use a transformation matrix, but have yet to find a reference/example to explain that.
Any help, greatly appreciated.