I want to change the orientation of a bitmap (square, 52x52 pixels). It works fine but my only problem is that I want the pivot point of the rotation to be the center of the bitmap. I'm not sure what is currently being used to do the rotation.
Any idea?


function dessine_boussole(dc, l, xPos, myHeading, cTitre){
var transform=new Graphics.AffineTransform();
myHeading=360-myHeading;
var radians=Math.toRadians(myHeading);
transform.rotate(radians);
dc.setAntiAlias(true);
dc.drawBitmap2(xPos,l+60,
boussole,
{ :bitmapX=>2, :bitmapY=>2,
:bitmapWidth=>48, :bitmapHeight=>48,
:transform=>transform});