public void AddRectangles(RectangleF[] rects) { if (rects == null) throw new ArgumentNullException(nameof(rects)); if (rects.Length == 0) throw new ArgumentException(nameof(rects)); int status = Gdip.GdipAddPathRectangles(_nativePath, rects, rects.Length); Gdip.CheckStatus(status); }
public unsafe void AddRectangles(RectangleF[] rects) { ArgumentNullException.ThrowIfNull(rects); if (rects.Length == 0) throw new ArgumentException(null, nameof(rects)); fixed(RectangleF *r = rects) { Gdip.CheckStatus(Gdip.GdipAddPathRectangles( new HandleRef(this, _nativePath), r, rects.Length)); } }