QuickFont.QBitmap.Colour32 C# (CSharp) Method

Colour32() public method

Sets colour without touching alpha values
public Colour32 ( byte r, byte g, byte b ) : void
r byte
g byte
b byte
return void
        public void Colour32(byte r, byte g, byte b)
        {
            unsafe
            {
                byte* addr;
                for (int i = 0; i < bitmapData.Width; i++)
                {
                    for (int j = 0; j < bitmapData.Height; j++)
                    {
                        addr = (byte*)(bitmapData.Scan0) + bitmapData.Stride * j + i * 4;
                        *addr = b;
                        *(addr + 1) = g;
                        *(addr + 2) = r;
                    }
                }
            }
        }