From 4cda8ae62880a807a3b19d68b5407eafeea6e338 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 2 Jul 2018 12:06:05 +0200 Subject: Return true if any annots have new APs in pdf_update_page. --- include/mupdf/pdf/document.h | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h index 5ab0fa2c..57e726d3 100644 --- a/include/mupdf/pdf/document.h +++ b/include/mupdf/pdf/document.h @@ -514,20 +514,24 @@ int pdf_add_portfolio_entry(fz_context *ctx, pdf_document *doc, void pdf_set_portfolio_entry_info(fz_context *ctx, pdf_document *doc, int entry, int schema_entry, pdf_obj *data); /* - pdf_update_page: update a page for the sake of changes caused by a call - to pdf_pass_event. pdf_update_page regenerates any appearance streams that - are out of date, checks for cases where different appearance streams - should be selected because of state changes, and records internally - each annotation that has changed appearance. The list of changed annotations - is then available via querying the annot->changed flag. Note that a call to - pdf_pass_event for one page may lead to changes on any other, so an app - should call pdf_update_page for every page it currently displays. Also - it is important that the pdf_page object is the one used to last render - the page. If instead the app were to drop the page and reload it then - a call to pdf_update_page would not reliably be able to report all changed - areas. -*/ -void pdf_update_page(fz_context *ctx, pdf_page *page); + pdf_update_page: Update a page for the sake of changes caused by a call + to pdf_pass_event or annotation editing functions. + + pdf_update_page regenerates any appearance streams that are out of + date, checks for cases where different appearance streams should be + selected because of state changes, and records internally each + annotation that has changed appearance. + + Each annotation that has changed has its has_new_ap flag set to true. + + Note that a call to pdf_pass_event for one page may lead to changes on + any other, so an app should call pdf_update_page for every page it + currently displays. Also it is important that the pdf_page object is + the one used to last render the page. If instead the app were to drop + the page and reload it then a call to pdf_update_page would not + reliably be able to report all changed areas. +*/ +int pdf_update_page(fz_context *ctx, pdf_page *page); /* Determine whether changes have been made since the -- cgit v1.2.3