Skip to content

Commit

Permalink
fitz/fitz.i: #2048: in get_textpage(), use page rect if clip not spec…
Browse files Browse the repository at this point in the history
…ified.
  • Loading branch information
julian-smith-artifex-com committed Nov 15, 2022
1 parent e876e81 commit 824be2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fitz/fitz.i
Expand Up @@ -4829,7 +4829,8 @@ struct Page {
memset(&options, 0, sizeof options);
options.flags = flags;
fz_try(gctx) {
fz_rect rect = JM_rect_from_py(clip);
// Default to page's rect if `clip` not specified, for #2048.
fz_rect rect = (clip==Py_None) ? fz_bound_page(gctx, page) : JM_rect_from_py(clip);
fz_matrix ctm = JM_matrix_from_py(matrix);
tpage = fz_new_stext_page(gctx, rect);
dev = fz_new_stext_device(gctx, tpage, &options);
Expand Down

0 comments on commit 824be2e

Please sign in to comment.