コード例 #1
0
        //
        // AddPolygon
        //
        public void AddPolygon(Point[] points)
        {
            if (points == null)
                throw new ArgumentNullException(nameof(points));

            int status = Gdip.GdipAddPathPolygonI(_nativePath, points, points.Length);
            Gdip.CheckStatus(status);
        }
コード例 #2
0
ファイル: GraphicsPath.cs プロジェクト: pedrobsaila/runtime
        /// <summary>
        /// Adds a polygon to the current figure.
        /// </summary>
        public unsafe void AddPolygon(Point[] points)
        {
            ArgumentNullException.ThrowIfNull(points);

            fixed(Point *p = points)
            {
                Gdip.CheckStatus(Gdip.GdipAddPathPolygonI(new HandleRef(this, _nativePath), p, points.Length));
            }
        }