/// <summary> /// Get a paragraph, given a position within the text. /// </summary> /// <param name="charIndex">The index of a character within the text, in the range [0..<see cref="ProcessedLength"/>-1]</param> /// <param name="paraStart">Will receive the index of the first character of the paragraph in the text</param> /// <param name="paraLimit">Will receive the limit of the paragraph</param> /// <param name="paraLevel">Will receive the level of the paragraph</param> /// <returns>The index of the paragraph containing the specified position</returns> public int GetParagraph(int charIndex, out int paraStart, out int paraLimit, out byte paraLevel) { var ret = NativeMethods.ubidi_getParagraph(_biDi, charIndex, out paraStart, out paraLimit, out paraLevel, out var errorCode); ExceptionFromErrorCode.ThrowIfError(errorCode, "Paragraph retrieval failed! " + errorCode); return(ret); }