Returning a TCanvas

hi all

i have a c++ program which does plots. the whole process of creating the canvas, filling it with histos and legends and whatnot happens in a function, which then saves the canvas as pdf/eps. suppose i want to have a copy of the actual plot, so that i can add for instance another TPaveText or something on top, afterwards. is there a way i can return the TCanvas from the function that saves the plot? i’m thinking of something like:

// instead of:

//something like:
TCanvas* c1 = myPlotterClass->drawPlot();

problem is i’ve noticed that the TCanvas(&TCanvas) copy constructor is private, so i’m not sure how to implement this. is there a way to do this?


if myPlotterClass->drawPlot(); returns a pointer to a TCanvas, what you do should work.