Пример #1
0
        public static WindowsGraphics FromHdc(IntPtr hDc)
        {
            DeviceContext dc = DeviceContext.FromHdc(hDc);

            return(new WindowsGraphics(dc)
            {
                _disposeDc = true // we create it, we dispose it.
            });
        }
Пример #2
0
        public static WindowsGraphics FromHdc(IntPtr hDc)
        {
            Debug.Assert(hDc != IntPtr.Zero, "null hDc");

            DeviceContext   dc = DeviceContext.FromHdc(hDc);
            WindowsGraphics wg = new WindowsGraphics(dc)
            {
                _disposeDc = true // we create it, we dispose it.
            };

            return(wg);
        }