60 wbox.TWbox::Copy(*
this);
68 src.TWbox::Copy(*
this);
96 TWbox *newwbox =
new TWbox(
x1,y1,
x2,y2,color,bordersize,bordermode);
140 if (bordermode == 0)
return;
141 if (bordersize <= 0) bordersize = 2;
143 Short_t pxl,pyl,pxt,pyt,px1,py1,px2,py2;
147 px1 =
gPad->XtoPixel(
x1); py1 =
gPad->YtoPixel(y1);
148 px2 =
gPad->XtoPixel(
x2); py2 =
gPad->YtoPixel(y2);
149 if (px1 < px2) {pxl = px1; pxt = px2; xl =
x1; xt =
x2; }
150 else {pxl = px2; pxt = px1; xl =
x2; xt =
x1;}
151 if (py1 > py2) {pyl = py1; pyt = py2; yl = y1; yt = y2;}
152 else {pyl = py2; pyt = py1; yl = y2; yt = y1;}
154 if (!
gPad->IsBatch()) {
163 frame[0].
fX = pxl; frame[0].
fY = pyl;
164 frame[1].
fX = pxl + bordersize; frame[1].
fY = pyl - bordersize;
165 frame[2].
fX = frame[1].
fX; frame[2].
fY = pyt + bordersize;
166 frame[3].
fX = pxt - bordersize; frame[3].
fY = frame[2].
fY;
167 frame[4].
fX = pxt; frame[4].
fY = pyt;
168 frame[5].
fX = pxl; frame[5].
fY = pyt;
169 frame[6].
fX = pxl; frame[6].
fY = pyl;
176 frame[0].
fX = pxl; frame[0].
fY = pyl;
177 frame[1].
fX = pxl + bordersize; frame[1].
fY = pyl - bordersize;
178 frame[2].
fX = pxt - bordersize; frame[2].
fY = frame[1].
fY;
179 frame[3].
fX = frame[2].
fX; frame[3].
fY = pyt + bordersize;
180 frame[4].
fX = pxt; frame[4].
fY = pyt;
181 frame[5].
fX = pxt; frame[5].
fY = pyl;
182 frame[6].
fX = pxl; frame[6].
fY = pyl;
198 gPad->PaintBorderPS(xl, yl, xt, yt, bordermode, bordersize,
212 out<<
"wbox = new TWbox("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2<<
");"<<std::endl;
217 out<<
" wbox->Draw();"<<std::endl;
static const double x2[5]
static const double x1[5]
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Bool_t IsTransparent() const
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
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.
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 PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Double_t fX1
X of 1st point.
void Copy(TObject &box) const
Copy a Box.
Double_t fY2
Y of 2nd point.
Double_t fX2
X of 2nd point.
Double_t fY1
Y of 1st point.
static Int_t GetColorBright(Int_t color)
Static function: Returns the bright color number corresponding to n If the TColor object does not exi...
static Int_t GetColorDark(Int_t color)
Static function: Returns the dark color number corresponding to n If the TColor object does not exist...
Mother of all ROOT objects.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
@ kCanDelete
if object in a list can be deleted
A TBox with a bordersize and a bordermode.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
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.
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.
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 ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Int_t GetDarkColor() const
Int_t GetLightColor() const
virtual void Paint(Option_t *option="")
Paint this wbox with its current attributes.
Short_t fBorderSize
window box bordersize in pixels
TWbox & operator=(const TWbox &src)
assignment operator
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
void Copy(TObject &wbox) const
Copy this wbox to wbox.
virtual void Draw(Option_t *option="")
Draw this wbox with its current attributes.