I have to mirror a piece of the picture right to left.
Here is what I have:
My picture stays the same everytime I run the code.
I even switch my for loops to see if it would make a difference
but it doesn't. My picture just stays the same.
public void mirrorTemple()
{
int mirrorPoint =276;
//int mirrorPoint = getWidth() / 2;
Pixel leftPixel = null;
Pixel rightPixel = null;
int count =0;
for(int y = 37; y < 86; y++)
{
for(int x = 535; x < mirrorPoint; x++)
{
rightPixel = getPixel(x,y);
leftPixel = getPixel(x, (mirrorPoint + (mirrorPoint - y)));
leftPixel.setColor(rightPixel.getColor());
count = count + 1;
}
}
System.out.println("We copied " + count + " pixels.");
}