TCanvas::Print PNG outputs fraction of figure when canvas size is declared

I found a small extra screen and can reproduce your issue with root/cocoa. I managed to get a wrong png.

Note it is really a Cocoa issue. The X11 version on Mac does not have this problem.

If the image is generated from the TCanvas menu then it works.

1 Like

I found that I do not need to rotate the small screen to get the truncated picture. It is enough to have my terminal window on that screen. Then I run root from there. The graphics window appears on the iMac large screen and then the png is the truncated one I posted. If I run in batch with the same configuration all is fine (of course).

Well that is step in the right direction. I’m glad you were finally able to reproduce it.

@ksmith
I just committed the fix in the ROOT master. I can back port it to earlier an version if you want to test it. As it is a very specific problem affecting a very number of people I will back port only if you request it. If you are happy reinstalling the master I won’t back port it.

Agreed this is a very specific case and most likely won’t need to be back ported. @Wile_E_Coyote may want the fix moved to ROOT 5 though? I will test the master and let you know the result. (I wrote up a long message as I thought this was in reply to Xcode 9, I’m glad I stopped and read the topic title first.)

Note that in my last tests (here and here), I was always having non-truncated pictures, just their sizes depended on the used sequence of Print commands.

Yes I know. Unfortunately this thread is mixing several things not related … We fixed @ksmith problem with Mac and 2 screens. Now I will look at the two “here” you are talking about.

I do not think he is on Mac …

The original issue reported is now solved. I have marked the topic as such. Thank you for putting in the extended effort to fix this very strange edge case.

You’re welcome :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.