diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-06-26 14:45:15 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-07-04 17:23:21 +0200 |
commit | 1f787e13a6c75cf12a09fc44d590ba9169c52a71 (patch) | |
tree | e22d92e99290f40600044137ecd494e335352cda /include | |
parent | b064110f9640e19e7c582ad7aa227ea03ac07fe7 (diff) | |
download | mupdf-1f787e13a6c75cf12a09fc44d590ba9169c52a71.tar.xz |
Add fz_snap_selection function to snap selection to chars/words/lines.
Updates the input point coordinates, and also returns a quad with
appropriate UI handles.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/structured-text.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mupdf/fitz/structured-text.h b/include/mupdf/fitz/structured-text.h index 44219f4d..2adfa73a 100644 --- a/include/mupdf/fitz/structured-text.h +++ b/include/mupdf/fitz/structured-text.h @@ -152,6 +152,15 @@ int fz_search_stext_page(fz_context *ctx, fz_stext_page *text, const char *needl */ int fz_highlight_selection(fz_context *ctx, fz_stext_page *page, fz_point a, fz_point b, fz_quad *quads, int max_quads); +enum +{ + FZ_SELECT_CHARS, + FZ_SELECT_WORDS, + FZ_SELECT_LINES, +}; + +fz_quad fz_snap_selection(fz_context *ctx, fz_stext_page *page, fz_point *ap, fz_point *bp, int mode); + /* fz_copy_selection: Return a newly allocated UTF-8 string with the text for a given selection. |