Pinta.Core.BitVector2DSurfaceAdapter.Clear C# (CSharp) Method

Clear() public method

public Clear ( bool newValue ) : void
newValue bool
return void
        public void Clear(bool newValue)
        {
            unsafe {
            uint val = newValue ? 0xffffffff : 0;

            for (int y = 0; y < Height; ++y) {
                ColorBgra* row = surface.GetRowAddressUnchecked (y);

                int w = (this.Width + 31) / 32;

                while (w > 0) {
                    row->Bgra = val;
                    ++row;
                    --w;
                }
            }
            }
        }