return newRGB;
	public static final int[]rotate(int[]argbArray,int width, int heigth,int rotation,int referenceX,int referenceY,int backgroundColor){				double cosR = Math.cos(Math.PI*rotation/180);				double sinR = Math.sin(Math.PI*rotation/180);						int newWidth = getNewWidth(rotation,width,heigth,cosR,sinR);				int newHeigth = getNewHeigth(rotation,width,heigth,cosR,sinR);				int []newRGB = new int [newHeigth * newWidth];				int halfOfWidth = width/2;				int halfOfHeigth = heigth/2;				int refX,refY,newX,newY,sumXY;				for(int x = 0; x < newWidth; x++){					for(int y = 0; y < newHeigth; y++){							refX = x - referenceX;						refY = y - referenceY;						newX = (int)(refX  * cosR + refY * sinR);						newY = (int)(refY * cosR - refX   * sinR);						newX += halfOfWidth;						newY += halfOfHeigth;						if( newX >= 0 && newX < width && newY >= 0 && newY < heigth ){							sumXY  = newX + newY * width;							newRGB [x+y*newWidth] = argbArray[sumXY];						}else{							newRGB [x+y*newWidth] = backgroundColor;						}					}				}				return newRGB;			}