Painting a TCanvas to the screen in a compiled ROOT (CERN) application

前端 未结 1 843
深忆病人
深忆病人 2021-01-13 17:57

What are the rules for painting to the screen?

My end goal is to put the TCanvas into a class and paint from there, but for now I think that maybe looking at a less

相关标签:
1条回答
  • 2021-01-13 18:31

    I usually use TApplications like below to have TCanvases really appear as window on the screen.

    #include "TApplication.h"
    // other stuff
    
    int main(int argc, char** argv) {
      TApplication theApp("App",&argc, argv);
      // your code
      // here you can Draw() things
      theApp.Run();
      return 0;
    }
    

    The program then just stops at Run() and I end the process with ^C.

    0 讨论(0)
提交回复
热议问题