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

Windows.Win32.Graphics.Gdi.RegionScope

struct RegionScope
Helper to scope creating regions. Deletes the region when disposed.
namespace Windows.Win32.Graphics.Gdi { internal ref struct RegionScope { public HRGN Region { get; } public bool IsNull { get; } public RegionScope(Rectangle rectangle); public RegionScope(int x1, int y1, int x2, int y2); public RegionScope(HDC hdc); public RegionScope(HRGN region); public static implicit operator HRGN(RegionScope regionScope); public void RelinquishOwnership(); public void Dispose(); } }