When declaring the size of a canvas in the constructor the Print method to png outputs only the upper right corner of the figure. Without specification of the dimension the Print method works as expected. (I assume I will have to wait until @couet returns for an answer.)
BTW. I have just checked them and I can confirm that both reported problems (the completely unreliable TCanvas::SetWindowSize and the one related to “RequestedH” and/or “RequestedW”) are still there in the newest ROOT v5-34-00-patches and in 6.10.04.
To make this even worse I discovered today that the outcome of the png depends on which monitor my terminal is sitting it. I can run the script with the terminal in a small monitor and get a corner and then move the terminal to a large monitor and get the entire image.
I just ran your macro on Mac with ROOT version 6.11/01 . I ran it in interactive mode and in batch mode. The 3 png files it produces are correct in both cases. I do not see the effect you are mentioning in your first post.
I believe this is dependent on the monitor configuration. I have a somewhat unusual setup on this machine with four monitor all over various dimensions. I have the following (I don’t know how to have it list the relative positions, but I’d be willing to experiment if needed.):
Monitor
Dimension
Rotation
1
3360 x 1890
0
2
1200 x 1920
0
3
1920 x 1080
270
4
1200 x 1600
90
The total resolution reported from xrandr is is 7680 x 1898
In addition, the clipping only occurs when the terminal is placed in either of the rotated monitors. The problem does not show up in batch mode (I have noticed that images made in batch mode are sharper than those created outside.)
Is there something else I can provide to help your investigation?
After some further testing, I seem to have narrowed it down to the fact that there are three rotations. If I reduce the number of rotations to one (All 0 degrees) or two (0 deg and 90 deg OR 0 deg and 270 deg) then the issue seems to go away. I didn’t realize initially that this would be such a strange corner case.
This is an old HP EliteBook 8530p laptop running Ubuntu 14.04.5 LTS / x86_64:
[...] $ xrandr
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
1680x1050 60.0*+
1400x1050 60.0
(...)
640x480 59.4
DVI-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
I ran again the macro using the X11 backend on Mac both in natch and interactive mode and the 3 png files are correct. It was hard to debug a problem I cannot reproduce …
I’ve further narrowed this issue down. It doesn’t have anything to do with the construction of the Canvas. It just so happened that when specifying the size alone the canvas was created on the largest monitor in my setup (3360 x 1890), while in the other two case the canvases were created on other windows. If I move any canvas to the large monitor and select print I only get a corner of the image. Further more this screen has the resolution scaled, if I remove the scaling and use the native resolution (3840 x 1920) then the issue disappears.
You do not have access to a Mac? Wile, indicated that the problem is also visible on Ubuntu. I believe all that needs to be done is to scale the resolution through the Display Settings. Is there something I can do on my end to provide more debugging information? I probably just need a couple of ideas of where to look to get started.
So it shows only with the X11 version in interactive mode. It works in batch mode. gif and pdf work in both mode. The Cocoa version is fine in all cases.