# Rotations and bitmapdata container

**URL:** <https://forum.kirupa.com/t/rotations-and-bitmapdata-container/274660>\
**Category:** Uncategorized\
**Created:** [November 2, 2008, 10:25am UTC](https://forum.kirupa.com/t/rotations-and-bitmapdata-container/274660 "2008-11-02T10:25:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coggia](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@coggia](https://forum.kirupa.com/u/coggia)\
**Post date:** [November 2, 2008, 10:25am UTC](https://forum.kirupa.com/t/rotations-and-bitmapdata-container/274660/1 "2008-11-02T10:25:23Z")

</div>

Hello,  
I’m Trying MatrixTransformer.rotateAroundExternalPoint, and i’m stuck into a precise point :

I got an image (50px width, 20px height) which turns around a given point:

```auto

//angle is an angle given at a time 
MatrixTransformer.rotateAroundExternalPoint(scalingPlaneMatrix, 275, 200, angle); 
//I create the bitmapdata
matrixImage = new BitmapData(50, 20, true, 0x00000000); 
//Apply the tranform to the image                          
matrixImage.draw(BitmapData(image),scalingPlaneMatrix); 
//passing it to a container
objet.displayBD=matrixImage; 
//..and displaying the result (objet.Rect is 50x20, and is Position is define dynamically)        
stageBitmapData.copyPixels(BitmapData(objet.displayBD), objet.Rect, objet.Position, null, null, true); 
 

```

The image is displayed, but when the transformations (rotations) are applied with rotateAroundExternalPoint, at a given time the image will be excentered and wil be outside the values of 50,20 of the bitmapdata…

Question is :  
How could I recenter or transform my BitmapData to display it fully in the stageBitmapData even with transfomation applied ?  
transformée en suivant ces rotations ?
