TPaveText* pt = new TPaveText(0.2, 0.2, 0.8, 0.8); pt->AddText("Hello World!"); pt->Draw();
TPaveText* pt = new TPaveText(0.2, 0.2, 0.8, 0.8); pt->AddText("Line 1"); pt->AddText("Line 2"); pt->AddText("Line 3"); pt->Draw();
TPaveText* pt = new TPaveText(0.2, 0.2, 0.8, 0.8); pt->SetFillColor(2); pt->SetFillStyle(3001); pt->SetTextSize(0.05); pt->SetTextAlign(22); pt->AddText("Customized Text Box"); pt->AddText("Line 1"); pt->AddText("Line 2"); pt->AddText("Line 3"); pt->Draw();This code creates a `TPaveText` object and customizes it using various functions like `SetFillColor()`, `SetFillStyle()`, `SetTextSize()`, and `SetTextAlign()`. The `AddText()` function is used to add four lines of text to the text box, and then the `Draw()` function is called to display the text box in the canvas. Overall, `TPaveText Draw` is a useful function that allows the user to display text boxes with various customization options in a ROOT canvas. It is a part of the ROOT package library.