Win32.NativeWin32MemoryDc.PatBlt C# (CSharp) Method

PatBlt() public method

public PatBlt ( PatBltColor color ) : void
color PatBltColor
return void
        public void PatBlt(PatBltColor color)
        {
            MyWin32.PatBlt(memHdc, 0, 0, _width, _height, (int)color);
        }
        public void SetBackTransparent(bool value)

Usage Example

        void CreateGraphicsFromNativeHdc(int width, int height)
        {
            win32MemDc = new NativeWin32MemoryDc(width, height, true);
            win32MemDc.PatBlt(NativeWin32MemoryDc.PatBltColor.White);
            win32MemDc.SetBackTransparent(true);
            win32MemDc.SetClipRect(0, 0, width, height);

            this.originalHdc = win32MemDc.DC;
            //--------------
            //set default font and default text color
            this.CurrentFont = new RequestFont("tahoma", 14);
            this.CurrentTextColor = Color.Black;
            //--------------

        }