I have a code problem with this method rotate 90Right ().
Statement Write a method that is capable of rotating an image 90 degrees to the right.
This is my code:
/**
* Rota la imagen 90 grados hacia la derecha
*/
public void rotar90ALaDerecha()
{
Color temp[][]= new Color[ALTO_MAXIMO][ANCHO_MAXIMO];
for(int i=0; i<alto;i++)
{
for(int j=0; j<ancho;j++)
{
temp[j][alto-1-i]=bitmap[i][j];
}
}
bitmap = new Color[ANCHO_MAXIMO][ALTO_MAXIMO];
bitmap = temp;
}
I get this error:
The height of the image does not change, when rotating it should be changed by the original width. It was expected 300, but you answered 200 expected:
Note: here I leave the class diagram and thank you very much for your help in advance.