fpw / avitab

X-Plane plugin that displays a tablet to aid VR usage
GNU Affero General Public License v3.0
299 stars 58 forks source link

Enhance Charts app PDF viewing when moving between pages or rotating. #121

Closed mjh65 closed 2 years ago

mjh65 commented 2 years ago

When opening single page PDFs and images these will be zoomed to fit and aligned centrally. Multiple page docs will be zoomed to fit width of first page and aligned at the top (in the middle). When moving to the next page this will be aligned at the top to assist continuity if reading. Similarly, when moving to the previous page this will be aligned at the bottom. After rotation the page will be aligned centrally for single page documents, or at the top for multiple page docs.

fpw commented 2 years ago

Awesome idea, I like it a lot! Only changed enums to enum classes since they have their own namespace and thus allow for more sane constant names. And I removed the new ChartSource interface since getPageCount was available in all sources as well, so I simply added the new getPageDimension function to all sources.