2 writes to _hdc
System.Drawing.Common (2)
System\Drawing\Printing\DefaultPrintController.cs (2)
32_hdc = new(document.PrinterSettings.CreateDeviceContext(_modeHandle)); 151_hdc = null;
14 references to _hdc
System.Drawing.Common (14)
System\Drawing\Printing\DefaultPrintController.cs (14)
17HDC IHandle<HDC>.Handle => _hdc?.Handle ?? HDC.Null; 24Debug.Assert(_hdc is null && _graphics is null, "PrintController methods called in the wrong order?"); 73Debug.Assert(_hdc is not null && _graphics is null, "PrintController methods called in the wrong order?"); 81HDC result = PInvoke.ResetDCW(_hdc, devmode); 82Debug.Assert(result == _hdc, "ResetDC didn't return the same handle"); 89_graphics = Graphics.FromHdcInternal(_hdc); 94int dpiX = PInvokeCore.GetDeviceCaps(_hdc, GET_DEVICE_CAPS_INDEX.LOGPIXELSX); 95int dpiY = PInvokeCore.GetDeviceCaps(_hdc, GET_DEVICE_CAPS_INDEX.LOGPIXELSY); 96int hardMarginX_DU = PInvokeCore.GetDeviceCaps(_hdc, GET_DEVICE_CAPS_INDEX.PHYSICALOFFSETX); 97int hardMarginY_DU = PInvokeCore.GetDeviceCaps(_hdc, GET_DEVICE_CAPS_INDEX.PHYSICALOFFSETY); 114Debug.Assert(_hdc is not null && _graphics is not null, "PrintController methods called in the wrong order?"); 138Debug.Assert(_hdc is not null && _graphics is null, "PrintController methods called in the wrong order?"); 140if (_hdc is not null) 150_hdc.Dispose();