Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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));
            }
        }