DAGetTextBlockCharQuad

Direct access, Text, Geometry

Description

Returns the descent-adjusted four-corner character cell in raw page coordinates

Syntax

Delphi

Function TPDFlib.DAGetTextBlockCharQuad(TextBlockListID, Index, CharIndex: Integer; Out X1, Y1, X2, Y2, X3, Y3, X4, Y4: Double): Integer;

Parameters

TextBlockListIDHandle returned by DAExtractPageTextBlocks
Index1-based text block index
CharIndex1-based UTF-16 code-unit position inside the block text
X1Receives the X coordinate of the lower start point; zero on failure
Y1Receives the Y coordinate of the lower start point; zero on failure
X2Receives the X coordinate of the lower end point; zero on failure
Y2Receives the Y coordinate of the lower end point; zero on failure
X3Receives the X coordinate of the upper end point; zero on failure
Y3Receives the Y coordinate of the upper end point; zero on failure
X4Receives the X coordinate of the upper start point; zero on failure
Y4Receives the Y coordinate of the upper start point; zero on failure

Outputs

The points follow lower start, lower end, upper end and upper start order in the source cell

Return values

1 on success, or 0 with zero outputs for an invalid handle or index

Remarks

Use the quad for exact rotated or sheared hit testing

See also

DAGetTextBlockCharLooseBox, GetTextBlockCharQuad