SelectRegion
Viewer interaction
Description
Creates the same retained selection a vmSelect drag produces, given a rectangle in page user-space points, and extracts its text into SelectedTextNegative widths and heights are normalised, a zero extent is rejected, and
OnMarqueeSelect may veto persistence while SelectedText still reports the extracted text
Syntax
Delphi
Function TPDFlibViewer.SelectRegion(APage: Integer; XPos, YPos, RWidth, RHeight: Double): Integer;Parameters
| APage | 1-based page of the region |
|---|---|
| XPos | Left edge of the region in page user-space points |
| YPos | Top edge of the region in page user-space points |
| RWidth | Width of the region in page user-space points, negative values are normalised |
| RHeight | Height of the region in page user-space points, negative values are normalised |
Return values
| 0 | No document is open, the page is out of range, the extent is zero, or the event vetoed persistence |
|---|---|
| > 0 | The selection was retained and the value is the new total number of selections |
See also
OnMarqueeSelect, SelectedText, SelectedRegionCount, SelectionColor, TPDFlibViewer