<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.7.25380.108" />

RGNDATAHEADER

struct RGNDATAHEADER
The RGNDATAHEADER structure describes the data returned by the GetRegionData function.
using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using Windows.Win32.Foundation; namespace Windows.Win32.Graphics.Gdi { [GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")] internal struct RGNDATAHEADER { internal uint dwSize; internal uint iType; internal uint nCount; internal uint nRgnSize; internal RECT rcBound; [return: Nullable(1)] public unsafe static RECT[] GetRegionRects(RGNDATAHEADER* regionData) { if (regionData == null || regionData->nCount == 0) return Array.Empty<RECT>(); return new Span<RECT>((byte*)regionData + regionData->dwSize, (int)regionData->nCount).ToArray(); } } }