Example #1
0
        //
        // AddRectangles
        //
        public void AddRectangles(Rectangle[] rects)
        {
            if (rects == null)
                throw new ArgumentNullException(nameof(rects));
            if (rects.Length == 0)
                throw new ArgumentException(nameof(rects));

            int status = Gdip.GdipAddPathRectanglesI(_nativePath, rects, rects.Length);
            Gdip.CheckStatus(status);
        }
Example #2
0
        public unsafe void AddRectangles(Rectangle[] rects)
        {
            ArgumentNullException.ThrowIfNull(rects);

            if (rects.Length == 0)
                throw new ArgumentException(null, nameof(rects));

            fixed(Rectangle *r = rects)
            {
                Gdip.CheckStatus(Gdip.GdipAddPathRectanglesI(
                                     new HandleRef(this, _nativePath), r, rects.Length));
            }
        }