Rooler.ScreenShot.GetLocalPixel C# (CSharp) Method

GetLocalPixel() public method

public GetLocalPixel ( int x, int y ) : int
x int
y int
return int
        public int GetLocalPixel(int x, int y)
        {
            int newX = x.Clamp(0, this.bounds.Width - 1);
            int newY = y.Clamp(0, this.bounds.Height - 1);

            //Debug.Assert(newX == x && newY == y);

            return this.pixels[newY * this.bounds.Width + newX];
        }