35 TLatex *TCreatePrimitives::fgText = 0;
37 TArrow *TCreatePrimitives::fgArrow = 0;
38 TLine *TCreatePrimitives::fgLine = 0;
40 TArc *TCreatePrimitives::fgArc = 0;
41 TEllipse *TCreatePrimitives::fgEllipse = 0;
42 TPave *TCreatePrimitives::fgPave = 0;
43 TPaveText *TCreatePrimitives::fgPaveText = 0;
44 TPavesText *TCreatePrimitives::fgPavesText = 0;
45 TDiamond *TCreatePrimitives::fgDiamond = 0;
46 TPaveLabel *TCreatePrimitives::fgPaveLabel = 0;
47 TGraph *TCreatePrimitives::fgPolyLine = 0;
48 TBox *TCreatePrimitives::fgPadBBox = 0;
78 x0 =
gPad->AbsPixeltoX(px);
79 y0 =
gPad->AbsPixeltoY(py);
80 xold =
gPad->AbsPixeltoX(px);
81 yold =
gPad->AbsPixeltoY(py);
85 xold =
gPad->AbsPixeltoX(px);
86 yold =
gPad->AbsPixeltoY(py);
125 x1 =
gPad->AbsPixeltoX(px);
126 y1 =
gPad->AbsPixeltoY(py);
127 if (
gPad->GetLogx()) {
131 if (
gPad->GetLogy()) {
147 gROOT->SetEditorMode();
162 static Int_t pxold, pyold;
163 static Int_t px0, py0;
169 x0 =
gPad->AbsPixeltoX(px);
170 y0 =
gPad->AbsPixeltoY(py);
172 pxold =
px; pyold =
py;
173 if (
gPad->GetLogx()) {
177 if (
gPad->GetLogy()) {
265 gROOT->SetEditorMode();
280 static Int_t px1old, py1old, px2old, py2old;
281 static Int_t px1, py1, px2, py2, pxl, pyl, pxt, pyt;
290 while ((obj =
next())) {
301 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
302 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
303 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
304 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
305 px1old =
px; py1old =
py;
340 gROOT->SetEditorMode();
341 if (xup <= xlow || yup <= ylow)
return;
342 newpad =
new TPad(
Form(
"%s_%d",
gPad->GetName(),n+1),
"newpad",xlow, ylow, xup, yup);
377 gPad->Modified(
kTRUE);
378 gROOT->SetEditorMode();
385 s.Replace(l-2, 2,
"<");
387 gPad->Modified(
kTRUE);
390 }
else if (isprint(py)) {
393 s.Insert(l-1,(
char)py);
395 gPad->Modified(
kTRUE);
402 x0 = gPad->AbsPixeltoX(px);
403 y0 = gPad->AbsPixeltoY(py);
407 xold = gPad->AbsPixeltoX(px);
408 yold = gPad->AbsPixeltoY(py);
410 xp0 = gPad->PadtoX(x0);
411 xp1 = gPad->PadtoX(xold);
412 yp0 = gPad->PadtoY(y0);
413 yp1 = gPad->PadtoY(yold);
435 gPad->Modified(
kTRUE);
459 gPad->Modified(
kTRUE);
483 gPad->Modified(
kTRUE);
507 gPad->Modified(
kTRUE);
531 gPad->Modified(
kTRUE);
556 ((
TPad *)gPad)->StartEditing();
559 gPad->Modified(
kTRUE);
564 gROOT->SetEditorMode();
577 static Int_t pxnew, pynew, pxold, pyold, dp;
579 static Int_t npoints = 0;
590 gPad->PadtoY(
gPad->AbsPixeltoY(pynew)));
593 xnew =
gPad->PadtoX(
gPad->AbsPixeltoX(pxnew));
594 ynew =
gPad->PadtoY(
gPad->AbsPixeltoY(pynew));
596 pxold =
gPad->XtoAbsPixel(xold);
597 pyold =
gPad->YtoAbsPixel(yold);
611 gROOT->SetEditorMode();
630 gROOT->SetEditorMode();
639 gPad->PadtoY(
gPad->AbsPixeltoY(pynew)));
650 gPad->PadtoY(
gPad->AbsPixeltoY(pynew)));
676 gROOT->SetEditorMode();
684 s.Replace(l-2, 2,
"<");
689 }
else if (isprint(py)) {
692 s.Insert(l-1,(
char)py);
707 x =
gPad->AbsPixeltoX(px);
708 y =
gPad->AbsPixeltoY(py);
717 gROOT->SetEditorMode();
virtual void SetY2(Double_t y2)
virtual void Draw(Option_t *option="")
Draw this diamond with its current attributes.
virtual const char * GetTitle() const
Returns title of object.
static Double_t GetDefaultWaveLength()
Get default wave length.
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
static TGraph * fgPolyLine
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
static void PolyLine(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new PolyLine in gPad.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
static Double_t GetDefaultAmplitude()
Get default wave amplitude.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
R__EXTERN TStyle * gStyle
virtual void Draw(Option_t *option="")
Draw this marker with its current attributes.
virtual ~TCreatePrimitives()
TCreatePrimitives destructor.
static Double_t GetDefaultWaveLength()
Get default wave length.
Short_t Min(Short_t a, Short_t b)
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetX1(Double_t x1)
virtual void SetX2(Double_t x2)
virtual void SetR1(Double_t r1)
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
virtual void Draw(Option_t *option="")
Draw this pavestext with its current attributes.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
static void Text(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new TLatex at the cursor position in gPad.
A TBox with a bordersize and a shadow option.
static TDiamond * fgDiamond
virtual void SetY2(Double_t y2)
Set the Y2 value.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
virtual void SetText(Double_t x, Double_t y, const char *text)
static Float_t GetDefaultArrowSize()
Get default arrow size.
virtual void SetStartPoint(Double_t x1, Double_t y1)
Set start point.
virtual void Draw(Option_t *option="")
Draw this arrow with its current attributes.
Implements curly or wavy polylines used to draw Feynman diagrams.
To draw Mathematical Formula.
static TCurlyLine * fgCLine
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
virtual void SetRadius(Double_t radius)
Set Curly Arc radius.
virtual void Draw(Option_t *option="")
Draw this ellipse with its current attributes.
static TEllipse * fgEllipse
virtual void SetLabel(const char *label)
A Pave (see TPave) with a text centered in the Pave.
static Double_t GetDefaultAmplitude()
Get default amplitude.
virtual void SetX2(Double_t x2)
virtual void SetEndPoint(Double_t x2, Double_t y2)
Set end point.
virtual void Delete(Option_t *option="")
Delete this object.
virtual void SetY1(Double_t y1)
static TPaveText * fgPaveText
virtual void Draw(Option_t *option="")
Draw this polyline with its current attributes.
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
virtual void SetX1(Double_t x1)
const char * GetTitle() const
Returns title of object.
unsigned int r1[N_CITIES]
virtual void SetX1(Double_t x1)
Set the X1 value.
The most important graphics class in the ROOT system.
char * Form(const char *fmt,...)
virtual void SetR2(Double_t r2)
static TPavesText * fgPavesText
virtual void SetY2(Double_t y2)
virtual void Draw(Option_t *option="")
Draw this pave with its current attributes.
virtual void SetY1(Double_t y1)
Set the Y1 value.
static const double x1[5]
A Pave (see TPave) with text, lines or/and boxes inside.
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
Color_t GetPadColor() const
static void Pad(Int_t event, Int_t px, Int_t py, Int_t)
Create a new pad in gPad.
static TPaveLabel * fgPaveLabel
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
virtual void SetX2(Double_t x2)
Set the X2 value.
virtual void Draw(Option_t *option="")
Draw this box with its current attributes.
Mother of all ROOT objects.
static Option_t * GetDefaultOption()
Get default option.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
static TCurlyArc * fgCArc
Short_t Max(Short_t a, Short_t b)
A Graph is a graphics object made of two arrays X and Y with npoints each.
static void Line(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new line/arrow in this gPad.
Double_t Sqrt(Double_t x)
Draw all kinds of Arrows.
virtual void Set(Int_t n)
Set number of points in the graph Existing coordinates are preserved New coordinates above fNpoints a...
A PaveText (see TPaveText) with several stacked paves.
virtual Style_t GetMarkerStyle() const
static void Pave(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new pavetext in gPad.
virtual void SetY1(Double_t y1)
Implements curly or wavy arcs used to draw Feynman diagrams.
TCreatePrimitives()
TCreatePrimitives default constructor.
unsigned int r2[N_CITIES]
static void Ellipse(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new arc/ellipse in this gPad.