QuickFont.JBitmap.GetPixelFast C# (CSharp) Method

GetPixelFast() public method

public GetPixelFast ( int px, int py, byte &col ) : void
px int
py int
col byte
return void
        public void GetPixelFast(int px, int py, ref byte col)
        {
            unsafe
            {
                byte* addr = (byte*)(bitmapData.Scan0) + bitmapData.Stride * py + px * (int)format;

                if (format == JBitmapPixelFormat.Format8bpp)
                {
                    col = *addr;
                }
                else if (format == JBitmapPixelFormat.Format24bppBGR)
                {
                    col = *addr;
                }
                else if (format == JBitmapPixelFormat.Format32bppBGRA)
                {
                    col = *(addr + 3);
                }
            }

        }

Same methods

JBitmap::GetPixelFast ( int px, int py, byte &r, byte &g, byte &b ) : void
JBitmap::GetPixelFast ( int px, int py, byte &r, byte &g, byte &b, byte &a ) : void