I know that you can get the pixel's position with the following algorithm:
y * bitmapWidth + x = pixel position (x, y)
When you pan the bitmap around, I thought you can get the pixel's position by adding the delta differences X, and Y to the original pixel's X and Y position. I later found out this isn't correct. What if I panned the bitmap to the negative X and negative Y axes?
So, I'm kind of stuck here. Anyone knows how to solve this?