Beispiel #1
0
        /// <summary>
        /// Gets the contour for the specified index.
        /// </summary>
        /// <param name="index">
        /// The contour index. [Limits: 0 &lt; value &lt; <see cref="Count"/>]
        /// </param>
        /// <returns>The contour, or null on failure.</returns>
        public Contour GetContour(int index)
        {
            if (IsDisposed || index < 0 || index >= root.contourCount)
            {
                return(null);
            }

            if (mContours == null)
            {
                mContours = new Contour[root.contourCount];
            }

            if (mContours[index] != null)
            {
                return(mContours[index]);
            }

            Contour result = new Contour();

            ContourSetEx.nmcsGetContour(root, index, result);
            mContours[index] = result;

            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// Gets the contour for the specified index.
        /// </summary>
        /// <param name="index">
        /// The contour index. [Limits: 0 &lt; value &lt; <see cref="Count"/>]
        /// </param>
        /// <returns>The contour, or null on failure.</returns>
        public Contour GetContour(int index)
        {
            if (IsDisposed || index < 0 || index >= root.contourCount)
                return null;

            if (mContours == null)
                mContours = new Contour[root.contourCount];

            if (mContours[index] != null)
                return mContours[index];

            Contour result = new Contour();

            ContourSetEx.nmcsGetContour(root, index, result);
            mContours[index] = result;

            return result;
        }