Print of gl canvas

It seems that this problem was in older versions of ROOT, but I could not find any recent information about this. I use root 5.25

I create a TF2 image on canvas created after

gStyle->SetCanvasPreferGL(kTRUE);

with something like mpsf->DrawClone(“glsurf2”);

It displays fine, until I try to print it to a file. Printed image contains just a part of a histogram frame and otherwise is white, regardless format (gif, jpg, png). I tried the same thing with gl samples from the ROOT package and had the same effect - no matter if I try to save from the command line or from the menu. Should I do anything special?

It needs to be implemented. The OpenGL interface is still under development.
You can save as PS but the file generated is big.

[quote]
It displays fine, until I try to print it to a file. Printed image contains just a part of a histogram frame and otherwise is white, regardless format (gif, jpg, png). I tried the same thing with gl samples from the ROOT package and had the same effect - no matter if I try to save from the command line or from the menu. Should I do anything special?[/quote]

Olivier is right, this part was not finished. You can use ps. Or just make a screen-shot :slight_smile:))

I understand. A shame, since I need to create an animated gif from maany function drawings, thus a screenshot would be a very difficult choice. Perhaps in the future… :slight_smile:

Depends what you want to do but if you want to make a seen, change angle zoom… you may capture a session using the event recorder (in the Tools menu of TCanvas) of course that will not help if you want to put it on the web.

I agree.
I’ll ask Valeri Onuchine, he should know how to fix it (since it’s asimage stuff I guess).

I think that won’t work. Unfortunately I modify a 2D function parameter than redraw it. Animation shows this function dependence on the modified parameter - like an evolution in time.

[quote]
I think that won’t work. Unfortunately I modify a 2D function parameter than redraw it. Animation shows this function dependence on the modified parameter - like an evolution in time.[/quote]

Well, at least this should definitly work with non-gl version and with root prior to 5.22

[quote=“tpochep”]
Well, at least this should definitly work with non-gl version and with root prior to 5.22[/quote]

Yes. I just wanted a nice, opengl view for aesthetic purposes and, of course, some details are better visible in 3d in opengl mode :slight_smile:

[quote=“LeWhoo”][quote=“tpochep”]
Well, at least this should definitly work with non-gl version and with root prior to 5.22[/quote]

Yes. I just wanted a nice, opengl view for aesthetic purposes and, of course, some details are better visible in 3d in opengl mode :slight_smile:[/quote]

Ok, thanks to Valeri Onuchine, it was easy to fix. jpg and png output are also ok now.


This is now fixed in the SVN trunk. You can print GL canvas in gif files.

Thank you, Olivier!

Great, thanks!

When drawing with glsurf2 (in my case) option, there is a rectangular frame around the histogram, gowing through axis labels etc. I tried drawing with “fb bb” option, but it does not help. How to remove that frame?

Can you, please, show a picture? I do not have the trunk version of ROOT.

[quote]
Can you, please, show a picture? I do not have the trunk version of ROOT.[/quote]

Do not see any special frame, “growing through axes, labels”. Both are glsurf2.
fb bb are ignored in gl. Back box always present (due to the slicing I have for different “glxxx” options).




That’s what I get, below. Perhaps it’s something in my code - I’ll make more tests.


better if you sent us a small script reproducing the problem.

Cannot reproduce. But I do not draw this frame anywhere in gl-code. So, this is some artifact of standard TCanvas/TPad.


It took me a while to find out when it happens. I attach the script.

It seems, that the frame is drawed, when I modify axis titles after the function is drawed.

This is important, when I do something like TF2 tf = (TF2)f->DrawCopy(“glsurf2”);
and than operate on tf to get title etc. Important when drawing the same function, but slightly modified, in two pads.
test_frame.C (261 Bytes)