Add GetPageInsetsForTwoUpView() to pdf/draw_utils.
In PDFiumEngine, currently the size of the shadows surrounding a page is constant because there is only a single page view. With the addition of two-up view, the sizes of the shadows will depend on the position of the page within its document. draw_utils::GetPageInsetsForTwoUpView() is a function that takes the position of the page within the document and shadow sizes, and returns the proper configuration of inset sizes for two-up view. Having this as a separate function makes this logic testable and reduces the future complexity of PDFiumEngine. Bug: 51472 Change-Id: Icecbb05f672b10ca682ae383308abb96075b64ca Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1707951 Commit-Queue: Jeremy Chinsen <chinsenj@google.com> Reviewed-by:Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#679590}
Showing
Please register or sign in to comment