78 ((
TWbox&)wbox).Copy(*
this);
105 TWbox *newwbox =
new TWbox(x1,y1,x2,y2,color,bordersize,bordermode);
149 if (bordermode == 0)
return;
150 if (bordersize <= 0) bordersize = 2;
152 Short_t pxl,pyl,pxt,pyt,px1,py1,px2,py2;
156 px1 =
gPad->XtoPixel(x1); py1 =
gPad->YtoPixel(y1);
157 px2 =
gPad->XtoPixel(x2); py2 =
gPad->YtoPixel(y2);
158 if (px1 < px2) {pxl = px1; pxt = px2; xl =
x1; xt =
x2; }
159 else {pxl = px2; pxt = px1; xl =
x2; xt =
x1;}
160 if (py1 > py2) {pyl = py1; pyt = py2; yl = y1; yt = y2;}
161 else {pyl = py2; pyt = py1; yl = y2; yt = y1;}
163 if (!
gPad->IsBatch()) {
172 frame[0].
fX = pxl; frame[0].
fY = pyl;
173 frame[1].
fX = pxl + bordersize; frame[1].
fY = pyl - bordersize;
174 frame[2].
fX = frame[1].
fX; frame[2].
fY = pyt + bordersize;
175 frame[3].
fX = pxt - bordersize; frame[3].
fY = frame[2].
fY;
176 frame[4].
fX = pxt; frame[4].
fY = pyt;
177 frame[5].
fX = pxl; frame[5].
fY = pyt;
178 frame[6].
fX = pxl; frame[6].
fY = pyl;
185 frame[0].
fX = pxl; frame[0].
fY = pyl;
186 frame[1].
fX = pxl + bordersize; frame[1].
fY = pyl - bordersize;
187 frame[2].
fX = pxt - bordersize; frame[2].
fY = frame[1].
fY;
188 frame[3].
fX = frame[2].
fX; frame[3].
fY = pyt + bordersize;
189 frame[4].
fX = pxt; frame[4].
fY = pyt;
190 frame[5].
fX = pxt; frame[5].
fY = pyl;
191 frame[6].
fX = pxl; frame[6].
fY = pyl;
207 gPad->PaintBorderPS(xl, yl, xt, yt, bordermode, bordersize,
221 out<<
"wbox = new TWbox("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2<<
");"<<std::endl;
226 out<<
" wbox->Draw();"<<std::endl;
void Copy(TObject &box) const
Copy a Box.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
static Int_t GetColorDark(Int_t color)
Static function: Returns the dark color number corresponding to n If the TColor object does not exist...
virtual ~TWbox()
wbox default destructor.
virtual void SetFillStyle(Style_t fstyle)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
static const double x2[5]
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual void Modify()
Change current fill area attributes if necessary.
Int_t GetDarkColor() const
virtual void PaintWbox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Color_t color=33, Short_t bordersize=5, Short_t bordermode=-1)
Draw this wbox with new coordinates.
virtual void Draw(Option_t *option="")
Draw this wbox with its current attributes.
virtual void DrawWbox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Color_t color=33, Short_t bordersize=5, Short_t bordermode=-1)
Draw this wbox with new coordinates.
A TBox with a bordersize and a bordermode.
static Int_t GetColorBright(Int_t color)
Static function: Returns the bright color number corresponding to n If the TColor object does not exi...
virtual void SetFillColor(Color_t fcolor)
virtual Color_t GetFillColor() const
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
Double_t fX1
tool tip associated with box
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
virtual Bool_t IsTransparent() const
static const double x1[5]
virtual void PaintFrame(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Color_t color, Short_t bordersize, Short_t bordermode, Bool_t tops)
Paint a 3D frame around a box.
void Copy(TObject &wbox) const
Copy this wbox to wbox.
Int_t GetLightColor() const
Mother of all ROOT objects.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual void Paint(Option_t *option="")
Paint this wbox with its current attributes.