コード例 #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);
        }
コード例 #2
0
ファイル: GraphicsPath.cs プロジェクト: pedrobsaila/runtime
        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));
            }
        }