48 fBorderSize = bordersize;
49 fBorderMode = bordermode;
59 wbox.TWbox::Copy(*
this);
67 src.TWbox::Copy(*
this);
95 TWbox *newwbox =
new TWbox(x1,y1,x2,y2,color,bordersize,bordermode);
173 Float_t xsize = 20, ysize = 26;
174 gStyle->GetPaperSize(xsize, ysize);
176 if (xsize * ratio > ysize)
180 ww = 72 / 2.54 * xsize;
181 wh = 72 / 2.54 * ysize;
210 Double_t frameXs[7] = {}, frameYs[7] = {};
213 frameXs[0] = xl; frameYs[0] = yl;
214 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
215 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
216 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
217 frameXs[4] = xt; frameYs[4] = yt;
218 frameXs[5] = xl; frameYs[5] = yt;
219 frameXs[6] = xl; frameYs[6] = yl;
222 pp->SetAttFill(*
this);
223 pp->DrawFillArea(7, frameXs, frameYs);
226 frameXs[0] = xl; frameYs[0] = yl;
227 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
228 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
229 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
230 frameXs[4] = xt; frameYs[4] = yt;
231 frameXs[5] = xt; frameYs[5] = yl;
232 frameXs[6] = xl; frameYs[6] = yl;
235 pp->SetAttFill(*
this);
236 pp->DrawFillArea(7, frameXs, frameYs);
240 if (with_selection) {
243 pp->SetAttLine(*
this);
254 SavePrimitiveConstructor(out,
Class(),
"wbox",
TString::Format(
"%g, %g, %g, %g",
fX1,
fY1,
fX2,
fY2),
kFALSE);
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Short_t
Signed Short integer 2 bytes (short).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Bool_t IsTransparent() const
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
virtual Color_t GetLineColor() const
Return the line color.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
Double_t fX1
X of 1st point.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Double_t fY2
Y of 2nd point.
Double_t fX2
X of 2nd point.
Double_t fY1
Y of 1st point.
void Copy(TObject &box) const override
Copy a Box.
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.
static void SavePrimitiveDraw(std::ostream &out, const char *variable_name, Option_t *option=nullptr)
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
@ kCanDelete
if object in a list can be deleted
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Double_t GetX2() const =0
virtual Int_t YtoPixel(Double_t y) const =0
virtual UInt_t GetWh() const =0
virtual Double_t GetY1() const =0
virtual TVirtualPadPainter * GetPainter()=0
virtual Double_t GetAbsWNDC() const =0
virtual Double_t GetAbsHNDC() const =0
virtual Double_t GetY2() const =0
virtual Int_t XtoPixel(Double_t x) const =0
virtual UInt_t GetWw() const =0
virtual Double_t GetX1() const =0
void Paint(Option_t *option="") override
Paint this box with its current attributes.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
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)
Int_t GetDarkColor() const
void Draw(Option_t *option="") override
Draw this box with its current attributes.
Int_t GetLightColor() const
virtual TWbox * 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)
Short_t fBorderSize
window box bordersize in pixels
TWbox & operator=(const TWbox &src)
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up).
void PaintBorderOn(TVirtualPad *pad, Double_t x1, Double_t y1, Double_t x2, Double_t y2, Short_t bordersize, Short_t bordermode, Bool_t with_selection=kFALSE)
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
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)
void Copy(TObject &wbox) const override
Copy a Box.
double ratio(double numerator, double denominator)