Things that we have: 2 dimensions, a object with it's coordinates (object P1), it's rotation center (pivot) C1. After that lets rotate it at pivot C1 by known angle A. Now let's move that pivot by vector V1 so now C2 = C1 + V1.
So now is the time for what I'm struggling with: how can I calculate new angle for that object (and probably some translation by vector)? To be more precise - I'm trying to apply new rotation and translation to that object coordinates so all of it's vertices will remain as they were before pivot moved to position C2? I've already tried to find any dependencies between angles and I really can't figure anything that would let me solve that. Simplified image here1
EDIT: Ok, so here I'll clarify what I'm trying to achiev: please refer to this image2: we have object P1, we have rotation center C1 and we rotate that object by known angle so we get in result object P2. Now we place new point, lets call it C2 and what I'm trying to get is to transform P1 vertices referencing to C2 point (to be exact I think it will be new rotation and some translation vector) to get exact same object like P2.
EDIT2: Looks like I've found pretty short and clean solution which works:
Lets calculate vector V1:
V1 = C2 - C1
Now rotate it by the same angle that P1 was rotated about C1 (angle A), and in result we have vector V2. To calculate vector by which we will translate all P1 vertices we need to simply substract them:
Vt = V1 - V2
And that vector Vt should be added to all original P1 vetices. Thanks for help!