-
Notifications
You must be signed in to change notification settings - Fork 191
Extend Snippet388 to generate PDF directly drawing on GC #2929
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
base: master
Are you sure you want to change the base?
Conversation
The snippet already prints an additional text when exporting to PDF so I'm not completely sure what is missing? Also as we are painting to a canvas everything is already implicitly rendered through the GC anyways isn't it? |
Yes, the text is there, but I would propose a set of more complex operations to be applied to showcase the usage
Still, there are differences, e.g. if I replace shell::print with canvas::print in the Snippet (to make it as similar as possible by directly applying the GC operations) the export looks different: background color + SWT.BORDER effect of the Canvas is shown when using canvas::print. I mostly adapted to snippet to test the behavior with Windows, but I thought it makes sense to have a Snippet that utilizes both uses cases in a complex scenario. |
Yes print will maybe print more of the controls parts. It was a bit clumsy as shell#print was not implemented in windows at all so there might me slight differences as well in when printing the canvas directly and when printing the whole shell. |
Which is fine in my opinion. I just wanted to give the option to check the export with both approaches. At least in windows they provide very different results depending on zoom, autoscale mode and advanced mode setting of the GC. But that is a problem in Control#print most likely. |
Currently Snippet388 showcases the PDF export by using Shell#print. This commit extends it to additionally probide the possibility to export a direct rendering on the GC.
f872299 to
7b630b9
Compare
Currently Snippet388 showcases the PDF export by using Shell#print. This PR extends it to additionally provide the possibility to export a direct rendering on the GC.