From a0f531e2492bd6d19edab9ca2e9f19f2284b0796 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 7 Nov 2017 11:51:40 +0100 Subject: Select and copy structured text by lines. --- include/mupdf/fitz/structured-text.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/structured-text.h b/include/mupdf/fitz/structured-text.h index 9aeadf04..b062813f 100644 --- a/include/mupdf/fitz/structured-text.h +++ b/include/mupdf/fitz/structured-text.h @@ -151,18 +151,16 @@ void fz_print_stext_page_as_text(fz_context *ctx, fz_output *out, fz_stext_page int fz_search_stext_page(fz_context *ctx, fz_stext_page *text, const char *needle, fz_rect *hit_bbox, int hit_max); /* - fz_highlight_selection: Return a list of rectangles to highlight given a selection rectangle. - - NOTE: This is an experimental interface and subject to change without notice. + fz_highlight_selection: Return a list of rectangles to highlight lines inside the selection points. */ -int fz_highlight_selection(fz_context *ctx, fz_stext_page *page, fz_rect rect, fz_rect *hit_bbox, int hit_max); +int fz_highlight_selection(fz_context *ctx, fz_stext_page *page, fz_point a, fz_point b, fz_rect *hit_bbox, int hit_max); /* - fz_copy_selection: Return a newly allocated UTF-8 string with the text for a given selection rectangle. + fz_copy_selection: Return a newly allocated UTF-8 string with the text for a given selection. - NOTE: This is an experimental interface and subject to change without notice. + crlf: If true, write "\r\n" style line endings (otherwise "\n" only). */ -char *fz_copy_selection(fz_context *ctx, fz_stext_page *page, fz_rect rect); +char *fz_copy_selection(fz_context *ctx, fz_stext_page *page, fz_point a, fz_point b, int crlf); /* struct fz_stext_options: Options for creating a pixmap and draw device. -- cgit v1.2.3