Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testcase and fix for rotation on the second and following pages. #171

Merged
merged 5 commits into from
Feb 14, 2018

Conversation

rototor
Copy link
Contributor

@rototor rototor commented Feb 2, 2018

We must add the previous vertical page margins.

The test case is also an example for a more complicated report table.

Also renamed setPdfMatrix to applyPdfMatrix, because it's not a replacement of the matrix but rather a addition to the current matrix. And we can spare the applying of the reverse matrix in the PDF case, as we can just saveGraphics()/restoreGraphics().

We must add the previous vertical page margins.

The testcase is also an example for a more complicated report table.
the state. Otherwise we might have an inbalanced save / restore.
(Which Acrobat Reader really does not like, but the macOS Preview
application does not care...)
@danfickle
Copy link
Owner

G’day @rototor

I’m not sure we can just use save/restore graphics as it is also in use for clip/setClip. The problem is that these may be out of order, for example:
Clip (save)
Transform (save)
SetClip (restore wrong!)
Pop transforms (restore)

This was why I came up with the convoluted system of inverse transforms and reapplying transforms in effect after a setClip call. Ideally, we could guarantee that clip/setClip and pushtransforms/poptransforms are only called in correct order, but I found the clipping system to be complex enough to make this difficult. Incidentally, save/restore is the only way to implement setClip.

@rototor
Copy link
Contributor Author

rototor commented Feb 13, 2018

@danfickle Ok, I restored the old behavior and removed the call to save/restore from the transform stuff.

@danfickle
Copy link
Owner

Thanks @rototor

Looks good.

@danfickle danfickle merged commit 09833be into danfickle:open-dev-v1 Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants