Is there a way to prevent TCanvas'es from drawing?

Dear ROOTers,

I need to create many TCanvas objects, use all their functionality and save them to disk. I would rather save histograms, but as a matter of fact I use geometrical shapes like TBoxes and they can’t be associated to histograms.

Since this has to run in a large simulation framework, I can’t afford to have them actually pop up for every single event processed. The code is compiled into libraries and then run using CINT macros which results in exactly this effect: Every call to create a new TCanvas results in a canvas window popping up.

Is there a way to prevent the actual creation in the system’s GUI system?

run in batch mode

root -b -q myscript.C