<PackageReference Include="System.Drawing.Common" Version="10.0.4" />

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(); } }