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

Windows.Win32.Graphics.Gdi.CreateBrushScope

Helper to scope the lifetime of a HBRUSH.
namespace Windows.Win32.Graphics.Gdi { internal readonly ref struct CreateBrushScope { public HBRUSH HBRUSH { get; } public bool IsNull { get; } public CreateBrushScope(Color color); public static implicit operator HBRUSH(ref CreateBrushScope scope); public static implicit operator HGDIOBJ(ref CreateBrushScope scope); public void Dispose(); } }