<PackageReference Include="System.Drawing.Common" Version="11.0.0-preview.2.26159.112" />

System.Drawing.IDeviceContext

public interface IDeviceContext : IDisposable
Defines methods for obtaining and releasing an existing handle to a Windows device context.
namespace System.Drawing { public interface IDeviceContext : IDisposable { IntPtr GetHdc(); void ReleaseHdc(); } }