you'd just have to translate the coordinates accordingly
|
means :
1) get the x/y coordinates
2) translate the coordinates so the point you want to rotate around is in the coordinate center
3) apply the rotation
4) translate the coordinates back
ex: you have a triangle consisting of the points A(2/4), B(2/2) and C(2/3) - you want to rotate around B, with an angle of 90 degrees.
to do that, you first define 2/2 as the coordinate center - to translate the coordinates, just substract the vector 2/2 from all your points. So the translated coordinates are
A(0/2), B(0/0) and C(0/1).
You calculate the new coordinates with the formula I gave you earlier.
You have the points A'(2/0), B'(0/0) and C'(1/0) now.
Now you just add the vector 2/2 you substracted earlier again, and have the final coordinates
A''(4/2), B''(2/2) and C''(3/1).
Oh, and of course that only makes sense if you're actually doing the drawing yourself with primitives. If you draw a Bitmap, you better use your libraries built-in functions to it - drawing a bitmap pixel per pixel is terribly slow.
EDIT: Added ' s to the points to mark them as distinct points.