TPaveText *text = new TPaveText(0.1, 0.1, 0.3, 0.3); text->SetFillStyle(1001); text->AddText("Hello world!"); text->Draw();
TPaveText *text = new TPaveText(0.5, 0.5, 0.7, 0.7); text->SetFillStyle(3354); text->AddText("Goodbye world."); text->Draw();This example creates a text box with a fill style of 3354 (a custom pattern) and adds the text "Goodbye world." to it. The text box is then drawn on the canvas. In both examples, the SetFillStyle function is used to customize the appearance of the text box. The ROOT package library is used to create and manipulate the text boxes.