/// <summary> /// Gets the contour for the specified index. /// </summary> /// <param name="index"> /// The contour index. [Limits: 0 < value < <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); }
/// <summary> /// Gets the contour for the specified index. /// </summary> /// <param name="index"> /// The contour index. [Limits: 0 < value < <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; }