CSharpGL.FontBitmapHelper.IsEmptyPixel C# (CSharp) Метод

IsEmptyPixel() приватный статический Метод

Returns true if the given pixel is empty (i.e. black)
private static IsEmptyPixel ( BitmapData bitmapData, int x, int y ) : bool
bitmapData BitmapData
x int
y int
Результат bool
        private static unsafe bool IsEmptyPixel(BitmapData bitmapData, int x, int y)
        {
            var addr = (byte*)(bitmapData.Scan0) + bitmapData.Stride * y + x * 3;
            return (*addr == 0 && *(addr + 1) == 0 && *(addr + 2) == 0);
        }