#include <Selection.h>
A class representing the current text selection.
Definition at line 15 of file Selection.h.
const char * pdftron::PDF::Selection::GetAsHtml |
( |
| ) |
const |
|
inline |
- Returns
- the current text selection in HTML format. HTML text will contain styling information such as text color, font size, style etc.
- Note
- this function can be used to implement clipboard copy and paste that preserves text formating.
Definition at line 148 of file Selection.h.
UString pdftron::PDF::Selection::GetAsUnicode |
( |
| ) |
const |
|
inline |
- Returns
- the current text selection represented as an Unicode string.
Definition at line 141 of file Selection.h.
void pdftron::PDF::Selection::GetAsUnicode |
( |
UString & |
out_str | ) |
const |
|
inline |
int pdftron::PDF::Selection::GetPageNum |
( |
| ) |
const |
|
inline |
- Returns
- the page number containing the selected text.
Definition at line 114 of file Selection.h.
std::vector< QuadPoint > pdftron::PDF::Selection::GetQuads |
( |
| ) |
const |
|
inline |
Returns the list of tight bounding quads in the current text selection.
- Parameters
-
quads | - Sets a pointer to an array of vertices representing a list of bounding quads for the selected text. Each bounding quad is represented using 8 numbers in an array of doubles. Each two consecutive values represent the x and y coordinates of a quad vertex and the four vertices are arranged counter-clockwisely, 3--------2
| |
| |
| |
0--------1
|
e.g., (quad[0], quad[1]) is the coordinate of vertex 0, and (quad[4], quad[5]) is the coordinate of vertex 2. Note that it is only ensured that the four vertices are arranged sequentially; it is possible in practice that (quad[0], quad[1]) is the coordinate of any vertex.
- Returns
- the number of quads in 'quads' array.
- Note
- the 'quads' array is owned by the current selection and does not need to be explicitly released.
Definition at line 124 of file Selection.h.
int pdftron::PDF::Selection::GetQuads |
( |
const double *& |
quads | ) |
const |
|
inline |
The documentation for this class was generated from the following file: