getOffset method

int getOffset(
  1. int x,
  2. int y
)

Implementation

int getOffset(int x, int y) {
  return y * width * bytePerPixel + x * bytePerPixel;
}