3.0.2 #15
ainceborn
announced in
Announcements
3.0.2
#15
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The Note box text in certain PDFs (e.g. WoW manual) was invisible because the decorative frame image was painted over the text without the intended clipping restriction.
Root cause 1 — W/W* operators were silently ignored clip() only stored clipWindingRule but never called intersectClippingPath(). The clipping path in the graphics state was therefore never updated, so images were drawn over the full page instead of just the frame/border area. Fixed by immediately calling intersectClippingPath(linePath) inside clip(), matching the behaviour of the original Apache PDFBox.
Root cause 2 — drawImage() never applied the current clipping path Even after fixing clip(), images were drawn without respecting the active clip because drawImage() never called setClip() before painting. Fixed by adding setClip() at the start of drawImage().
Regression fix — image flipping on pages with tiling patterns After the above fixes, images on pages that use a Pattern fill (/P1 scn) were rendered upside-down. The cause was drawTilingPattern(): it switches to a temporary Canvas for the pattern, calls setClip() which updates clipSaveCount to a save-level valid only for that temporary Canvas, then returns without restoring clipSaveCount. The next setClip() call on the main Canvas called canvas.restoreToCount() with a stale value, rolling the main Canvas back past the page y-flip transform, which flipped every subsequent image.
Fixed by saving and restoring clipSaveCount around the tiling pattern rendering, the same way lastClip is already handled.
What's Changed
Full Changelog: https://github.com/ainceborn/PdfBox-Android-3/compare/3.0.0..3.0.2
This discussion was created from the release 3.0.2.
All reactions