void pave_arc() { auto c1 = new TCanvas("c1", "MWE canvas", 1200, 800); const char *opts[4] = { "blNDC", "brNDC", "tlNDC", "trNDC" }; for (int x = 0; x < 2; ++x) { for(int y = 0; y < 2; ++y) { double x0 = 0.1 + x * 0.5; double y0 = 0.1 + y * 0.5; int indx = x*2 + y; auto pavetext = new TPaveText(x0, y0, x0 + 0.3, y0 + 0.1, opts[indx]); pavetext->SetTextColor(kGray); pavetext->SetFillColor(kBlue); pavetext->SetLineColor(kRed); pavetext->SetBorderSize(3 + indx*3); pavetext->SetLineWidth(10 - indx*3); pavetext->AddText(TString::Format("option %s only", opts[indx])); auto pavetext2 = new TPaveText(x0, y0 + 0.15, x0 + 0.3, y0 + 0.25, TString::Format("%s ARC", opts[indx])); pavetext2->SetCornerRadius(0.1); pavetext2->SetTextColor(kGray); pavetext2->SetFillColor(kBlue); pavetext2->SetLineColor(kRed); pavetext2->SetBorderSize(3 + indx*3); pavetext2->SetLineWidth(10 - indx*3); pavetext2->AddText(TString::Format("option %s ARC", opts[indx])); pavetext->Draw(); pavetext2->Draw(); } } c1->SaveAs("pave_arc.png"); }