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;
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.
TWbox()
wbox default constructor.
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
virtual ~TWbox()
wbox default destructor.
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
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.