Create grey scale of 200 x 200
boxes.
void greyscale()
{
for (
int i = 0; i <
n; i++) {
for (
int j = 0; j <
n; j++) {
TBox *
b =
new TBox(n1*j, n1*(
n-1-i), n1*(j+1), n1*(
n-i));
}
}
TPad *p =
new TPad(
"p",
"p",0.3, 0.3, 0.7,0.7);
const char *guibackground =
gEnv->
GetValue(
"Gui.BackgroundColor",
"");
TText *t =
new TText(0.5, 0.5,
"GUI Background Color");
}
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
Base class for several text objects.
- Author
- Olivier Couet
Definition in file greyscale.C.