[]
        
(Showing Draft Content)

C1.Util.DX.DirectWrite.TextAnalysisSource.GetTextAtPosition

GetTextAtPosition Method

GetTextAtPosition(int)

Gets a block of text starting at the specified text position.

Declaration
string GetTextAtPosition(int textPosition)
Parameters
Type Name Description
int textPosition

The first position of the piece to obtain. All positions are in UTF16 code units, not whole characters, which matters when supplementary characters are used.

Returns
Type Description
string

a block of text

Remarks

Returning NULL indicates the end of text, which is the position after the last character. This function is called iteratively for each consecutive block, tying together several fragmented blocks in the backing store into a virtual contiguous string. Although applications can implement sparse textual content that maps only part of the backing store, the application must map any text that is in the range passed to any analysis functions.