Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TLine.cxx
Go to the documentation of this file.
1// @(#)root/graf:$Id$
2// Author: Rene Brun 12/12/94
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include <cstdlib>
13
14#include <iostream>
15#include "TROOT.h"
16#include "TBuffer.h"
17#include "TLine.h"
18#include "TVirtualPad.h"
19#include "TClass.h"
20#include "TLineInteractive.h"
21#include "TCanvasImp.h"
22#include "TMath.h"
23#include "TPoint.h"
24
25
26/** \class TLine
27\ingroup BasicGraphics
28
29Use the TLine constructor to create a simple line.
30
31~~~ {.cpp}
32 TLine(Double_t x1,Double_t y1,Double_t x2,Double_t y2)
33~~~
34
35`x1`, `y1`, `x2`, `y2` are the coordinates of the first and the second point.
36
37_**Example**_:
38
39~~~ {.cpp}
40 root[] l = new TLine(0.2,0.2,0.8,0.3)
41 root[] l->Draw()
42~~~
43*/
44
45
46////////////////////////////////////////////////////////////////////////////////
47/// Line normal constructor.
48
54
55
56////////////////////////////////////////////////////////////////////////////////
57/// Line copy constructor.
58
60{
61 line.TLine::Copy(*this);
62}
63
64////////////////////////////////////////////////////////////////////////////////
65/// Assignment operator
66
68{
69 src.TLine::Copy(*this);
70 return *this;
71}
72
73////////////////////////////////////////////////////////////////////////////////
74/// Copy this line to line.
75
76void TLine::Copy(TObject &obj) const
77{
78 TObject::Copy(obj);
79 TAttLine::Copy(((TLine&)obj));
80 ((TLine&)obj).fX1 = fX1;
81 ((TLine&)obj).fY1 = fY1;
82 ((TLine&)obj).fX2 = fX2;
83 ((TLine&)obj).fY2 = fY2;
84}
85
86////////////////////////////////////////////////////////////////////////////////
87/// Compute distance from point px,py to a line.
88
90{
91 if (!gPad) return 9999;
92 if (!TestBit(kLineNDC)) return DistancetoLine(px,py,gPad->XtoPad(fX1),gPad->YtoPad(fY1),gPad->XtoPad(fX2),gPad->YtoPad(fY2));
93 Double_t x1 = gPad->GetX1() + fX1*(gPad->GetX2()-gPad->GetX1());
94 Double_t y1 = gPad->GetY1() + fY1*(gPad->GetY2()-gPad->GetY1());
95 Double_t x2 = gPad->GetX1() + fX2*(gPad->GetX2()-gPad->GetX1());
96 Double_t y2 = gPad->GetY1() + fY2*(gPad->GetY2()-gPad->GetY1());
97 return DistancetoLine(px,py,x1,y1,x2,y2);
98}
99
100////////////////////////////////////////////////////////////////////////////////
101/// Draw this line with new coordinates.
102
104{
105 TLine *newline = new TLine(x1, y1, x2, y2);
106 TAttLine::Copy(*newline);
107 newline->SetBit(kCanDelete);
108 newline->AppendPad();
109 return newline;
110}
111
112////////////////////////////////////////////////////////////////////////////////
113/// Draw this line with new coordinates in NDC.
114
116{
117 TLine *newline = DrawLine(x1, y1, x2, y2);
118 newline->SetBit(kLineNDC);
119 return newline;
120}
121
122////////////////////////////////////////////////////////////////////////////////
123/// Execute action corresponding to one event.
124/// This member function is called when a line is clicked with the locator
125///
126/// If Left button clicked on one of the line end points, this point
127/// follows the cursor until button is released.
128///
129/// if Middle button clicked, the line is moved parallel to itself
130/// until the button is released.
131
133{
134 if (!gPad || !gPad->IsEditable()) return;
135
136 auto &parent = *gPad;
137
138 Bool_t opaque = parent.OpaqueMoving();
139
140 auto inter = parent.GetInteractive<TLineInteractive>(this);
141
142 switch (event) {
143
144 case kArrowKeyPress:
145 case kButton1Down:
146 // create interactive object and assign it
147 inter = parent.MakeInteractive<TLineInteractive>(this, GetX1(), GetY1(), GetX2(), GetY2(), TestBit(kLineNDC));
148 // No break !!!
149
150 case kMouseMotion:
151 if (inter)
152 inter->SelectPoint(parent, px, py);
153 break;
154
155 case kArrowKeyRelease:
156 case kButton1Motion:
157 if (!inter)
158 return;
159 inter->ChangeCoordinate(parent, px, py, TestBit(kVertical), TestBit(kHorizontal));
160 if (!opaque) {
161 TAttLine::ModifyOn(parent);
162 inter->PaintLine(parent);
163 } else {
164 inter->Apply(this);
165 char guide = inter->GetGuideChar();
166 if (guide)
167 parent.ShowGuidelines(this, event, guide, true);
168 parent.Modified();
169 }
170 parent.UpdateAsync();
171 break;
172
173 case kButton1Up:
174 if (gROOT->IsEscaped()) {
175 gROOT->SetEscape(kFALSE);
176 if (opaque && inter) {
177 inter->Apply(this, kFALSE);
178 parent.Modified();
179 parent.ShowGuidelines(this, event);
180 }
181 } else if (opaque) {
182 parent.ShowGuidelines(this, event);
183 } else if (inter) {
184 inter->Apply(this);
185 parent.Modified();
186 }
187 parent.UpdateAsync();
188 parent.FreeInteractive(this);
189 break;
190
191 case kButton1Locate:
192 // Sergey: code is never used, has to be removed in ROOT7
193 ExecuteEvent(kButton1Down, px, py);
194 while (true) {
195 px = py = 0;
196 event = parent.GetCanvasImp()->RequestLocator(px, py);
197
199
200 if (event != -1) { // button is released
201 ExecuteEvent(kButton1Up, px, py);
202 return;
203 }
204 }
205 }
206}
207
208////////////////////////////////////////////////////////////////////////////////
209/// Get the slope of this TLine
210
212{
213 Double_t m = 0;
214 if (fX2 == fX1) {
215 Error("GetSlope", "This line is vertical. The slope in undefined");
216 m = TMath::Infinity();
217 } else {
218 m = (fY2-fY1)/(fX2-fX1);
219 }
220 return m;
221}
222
223////////////////////////////////////////////////////////////////////////////////
224/// Get the Y-Intercept of this TLine
225
227{
228 Double_t b = 0;
229 if (fX2 == fX1) {
230 Error("GetYIntercept", "This line is vertical. The Y-Intercept in undefined");
231 b = TMath::Infinity();
232 } else {
233 b = (fY1*fX2-fY2*fX1)/(fX2-fX1);
234 }
235 return b;
236}
237
238////////////////////////////////////////////////////////////////////////////////
239/// List this line with its attributes.
240
241void TLine::ls(Option_t *) const
242{
244 printf("%s X1=%f Y1=%f X2=%f Y2=%f\n",IsA()->GetName(),fX1,fY1,fX2,fY2);
245}
246
247////////////////////////////////////////////////////////////////////////////////
248/// Paint this line with its current attributes.
249
251{
252 if (!gPad) return;
254 else PaintLine(gPad->XtoPad(fX1),gPad->YtoPad(fY1),gPad->XtoPad(fX2),gPad->YtoPad(fY2));
255}
256
257////////////////////////////////////////////////////////////////////////////////
258/// Draw this line with new coordinates.
259
261{
262 if (!gPad) return;
263 TAttLine::Modify(); //Change line attributes only if necessary
264 gPad->PaintLine(x1,y1,x2,y2);
265}
266
267////////////////////////////////////////////////////////////////////////////////
268/// Draw this line with new coordinates in NDC.
269
271{
272 if (!gPad) return;
273 TAttLine::Modify(); //Change line attributes only if necessary
274 gPad->PaintLineNDC(u1,v1,u2,v2);
275}
276
277////////////////////////////////////////////////////////////////////////////////
278/// Dump this line with its attributes.
279
281{
282 printf("%s X1=%f Y1=%f X2=%f Y2=%f",IsA()->GetName(),fX1,fY1,fX2,fY2);
283 if (GetLineColor() != 1) printf(" Color=%d",GetLineColor());
284 if (GetLineStyle() != 1) printf(" Style=%d",GetLineStyle());
285 if (GetLineWidth() != 1) printf(" Width=%d",GetLineWidth());
286 printf("\n");
287}
288
289////////////////////////////////////////////////////////////////////////////////
290/// Save primitive as a C++ statement(s) on output stream out
291
292void TLine::SavePrimitive(std::ostream &out, Option_t *option)
293{
294 SavePrimitiveConstructor(out, Class(), "line", TString::Format("%g, %g, %g, %g", fX1, fY1, fX2, fY2), kFALSE);
295
296 SaveLineAttributes(out, "line", 1, 1, 1);
297
298 if (TestBit(kLineNDC))
299 out << " line->SetNDC();\n";
300
301 if (TestBit(kVertical))
302 out << " line->SetBit(TLine::kVertical);\n";
303
304 if (TestBit(kHorizontal))
305 out << " line->SetBit(TLine::kHorizontal);\n";
306
307 SavePrimitiveDraw(out, "line", option);
308}
309
310////////////////////////////////////////////////////////////////////////////////
311/// Check whether this line is to be drawn horizontally.
312
317
318////////////////////////////////////////////////////////////////////////////////
319/// Check whether this line is to be drawn vertically.
320
322{
323 return TestBit(kVertical);
324}
325
326////////////////////////////////////////////////////////////////////////////////
327/// Set NDC mode on if isNDC = kTRUE, off otherwise
328
330{
331 SetBit(kLineNDC, isNDC);
332}
333
334////////////////////////////////////////////////////////////////////////////////
335/// Force the line to be drawn horizontally.
336/// Makes fY2 equal to fY1. The line length is kept.
337/// TArrow and TGaxis also get this function by inheritance.
338
339void TLine::SetHorizontal(Bool_t set /*= kTRUE*/)
340{
341 SetBit(kHorizontal, set);
342 if (set && gPad) {
344 Int_t px1 = gPad->XtoAbsPixel(fX1);
345 Int_t px2 = gPad->XtoAbsPixel(fX2);
346 Int_t py1 = gPad->YtoAbsPixel(fY1);
347 Int_t py2 = gPad->YtoAbsPixel(fY2);
348 Int_t l = Int_t(TMath::Sqrt((px2-px1)*(px2-px1)+(py2-py1)*(py2-py1)));
349 if (fX2 >= fX1) fX2 = gPad->AbsPixeltoX(px1+l);
350 else fX2 = gPad->AbsPixeltoX(px1-l);
351 fY2 = fY1;
352 }
353}
354
355////////////////////////////////////////////////////////////////////////////////
356/// Force the line to be drawn vertically.
357/// Makes fX2 equal to fX1. The line length is kept.
358/// TArrow and TGaxis also get this function by inheritance.
359
360void TLine::SetVertical(Bool_t set /*= kTRUE*/)
361{
362 SetBit(kVertical, set);
363 if (set && gPad) {
365 Int_t px1 = gPad->XtoAbsPixel(fX1);
366 Int_t px2 = gPad->XtoAbsPixel(fX2);
367 Int_t py1 = gPad->YtoAbsPixel(fY1);
368 Int_t py2 = gPad->YtoAbsPixel(fY2);
369 Int_t l = Int_t(TMath::Sqrt((px2-px1)*(px2-px1)+(py2-py1)*(py2-py1)));
370 if (fY2 >= fY1) fY2 = gPad->AbsPixeltoY(py1-l);
371 else fY2 = gPad->AbsPixeltoY(py1+l);
372 fX2 = fX1;
373 }
374}
375
376////////////////////////////////////////////////////////////////////////////////
377/// Stream an object of class TLine.
378
380{
381 if (R__b.IsReading()) {
382 UInt_t R__s, R__c;
383 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
384 if (R__v > 1) {
385 R__b.ReadClassBuffer(TLine::Class(), this, R__v, R__s, R__c);
386 return;
387 }
388 //====process old versions before automatic schema evolution
389 TObject::Streamer(R__b);
390 TAttLine::Streamer(R__b);
391 Float_t x1,y1,x2,y2;
392 R__b >> x1; fX1 = x1;
393 R__b >> y1; fY1 = y1;
394 R__b >> x2; fX2 = x2;
395 R__b >> y2; fY2 = y2;
396 //====end of old versions
397
398 } else {
399 R__b.WriteClassBuffer(TLine::Class(),this);
400 }
401}
402////////////////////////////////////////////////////////////////////////////////
403/// Return the bounding Box of the Line
404
406{
407 Rectangle_t bbox{0, 0, 0, 0};
408 if (gPad) {
409 Int_t px1 = TestBit(kLineNDC) ? gPad->UtoPixel(fX1) : gPad->XtoPixel(fX1);
410 Int_t px2 = TestBit(kLineNDC) ? gPad->UtoPixel(fX2) : gPad->XtoPixel(fX2);
411 Int_t py1 = TestBit(kLineNDC) ? gPad->VtoPixel(fY1) : gPad->YtoPixel(fY1);
412 Int_t py2 = TestBit(kLineNDC) ? gPad->VtoPixel(fY2) : gPad->YtoPixel(fY2);
413
414 if (px1 > px2)
415 std::swap(px1, px2);
416 if (py1 > py2)
417 std::swap(py1, py2);
418
419 bbox.fX = px1;
420 bbox.fY = py1;
421 bbox.fWidth = px2 - px1;
422 bbox.fHeight = py2 - py1;
423 }
424 return bbox;
425}
426
427////////////////////////////////////////////////////////////////////////////////
428/// Set X coordinate of the center of the BoundingBox
429
431{
432 Double_t w2 = 0.5 * (fX2 - fX1);
434 SetX1(midx - w2);
435 SetX2(midx + w2);
436}
437
438////////////////////////////////////////////////////////////////////////////////
439/// Set Y coordinate of the center of the BoundingBox
440
442{
443 Double_t h2 = 0.5 * (fY2 - fY1);
445 SetY1(midy - h2);
446 SetY2(midy + h2);
447}
448
449////////////////////////////////////////////////////////////////////////////////
450/// Set left hand side of BoundingBox to a value
451/// (resize in x direction on left)
452
454{
455 auto xx = GetXCoord(x, TestBit(kLineNDC));
456 if (fX2 > fX1)
457 SetX1(xx);
458 else
459 SetX2(xx);
460}
461
462////////////////////////////////////////////////////////////////////////////////
463/// Set right hand side of BoundingBox to a value
464/// (resize in x direction on right)
465
467{
468 auto xx = GetXCoord(x, TestBit(kLineNDC));
469 if (fX2 > fX1)
470 SetX2(xx);
471 else
472 SetX1(xx);
473}
474
475////////////////////////////////////////////////////////////////////////////////
476/// Set top of BoundingBox to a value (resize in y direction on top)
477
479{
480 auto yy = GetYCoord(y, TestBit(kLineNDC));
481 if (fY2 > fY1)
482 SetY2(yy);
483 else
484 SetY1(yy);
485}
486
487////////////////////////////////////////////////////////////////////////////////
488/// Set bottom of BoundingBox to a value
489/// (resize in y direction on bottom)
490
492{
493 auto yy = GetYCoord(y, TestBit(kLineNDC));
494 if (fY2 > fY1)
495 SetY1(yy);
496 else
497 SetY2(yy);
498}
@ kMouseMotion
Definition Buttons.h:23
@ kArrowKeyRelease
Definition Buttons.h:21
@ kButton1Motion
Definition Buttons.h:20
@ kButton1Up
Definition Buttons.h:19
@ kArrowKeyPress
Definition Buttons.h:21
@ kButton1Down
Definition Buttons.h:17
@ kButton1Locate
Definition Buttons.h:22
#define b(i)
Definition RSha256.hxx:100
cudaEvent_t event
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
short Version_t
Class version identifier (short)
Definition RtypesCore.h:80
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:72
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
const char Option_t
Option string (const char)
Definition RtypesCore.h:81
Option_t Option_t option
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char DrawLine
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char y1
#define gROOT
Definition TROOT.h:417
#define gPad
Abstract base class for elements drawn in the editor.
Definition TAttBBox2D.h:19
Double_t GetYCoord(const Int_t y, Bool_t is_ndc=kFALSE, Bool_t is_absolute=kFALSE)
Can return ndc or normal values Also one can specify to use absolute coordinates for input parameter ...
Double_t GetXCoord(const Int_t x, Bool_t is_ndc=kFALSE, Bool_t is_absolute=kFALSE)
Return user X coordinate for pixel X value Can return ndc or normal values Also one can specify to us...
Line Attributes class.
Definition TAttLine.h:21
virtual void Streamer(TBuffer &)
virtual Color_t GetLineColor() const
Return the line color.
Definition TAttLine.h:36
virtual Width_t GetLineWidth() const
Return the line width.
Definition TAttLine.h:38
virtual void ModifyOn(TVirtualPad &pad)
Change current line attributes on specified pad.
Definition TAttLine.cxx:255
virtual Style_t GetLineStyle() const
Return the line style.
Definition TAttLine.h:37
virtual void Modify()
Change current line attributes if necessary.
Definition TAttLine.cxx:246
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Definition TAttLine.cxx:176
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
Compute distance from point px,py to a line.
Definition TAttLine.cxx:210
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.
Definition TAttLine.cxx:289
Buffer base class used for serializing objects.
Definition TBuffer.h:43
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
Bool_t IsReading() const
Definition TBuffer.h:86
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
void SelectPoint(TVirtualPad &parent, Int_t px, Int_t py)
Use the TLine constructor to create a simple line.
Definition TLine.h:22
void ls(Option_t *option="") const override
List this line with its attributes.
Definition TLine.cxx:241
virtual void SetY2(Double_t y2)
Definition TLine.h:70
static TClass * Class()
Double_t fY1
Y of 1st point.
Definition TLine.h:26
Double_t fX1
X of 1st point.
Definition TLine.h:25
Double_t GetYIntercept() const
Get the Y-Intercept of this TLine.
Definition TLine.cxx:226
virtual void SetX2(Double_t x2)
Definition TLine.h:68
Bool_t IsVertical()
Check whether this line is to be drawn vertically.
Definition TLine.cxx:321
virtual TLine * DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
Definition TLine.cxx:103
void SetBBoxY1(const Int_t y) override
Set top of BoundingBox to a value (resize in y direction on top)
Definition TLine.cxx:478
void SetVertical(Bool_t set=kTRUE)
Force the line to be drawn vertically.
Definition TLine.cxx:360
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
Definition TLine.cxx:260
Double_t GetSlope() const
Get the slope of this TLine.
Definition TLine.cxx:211
TLine()
Definition TLine.h:38
void SetBBoxCenterY(const Int_t y) override
Set Y coordinate of the center of the BoundingBox.
Definition TLine.cxx:441
void SetBBoxX2(const Int_t x) override
Set right hand side of BoundingBox to a value (resize in x direction on right)
Definition TLine.cxx:466
virtual TLine * DrawLineNDC(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates in NDC.
Definition TLine.cxx:115
Bool_t IsHorizontal()
Check whether this line is to be drawn horizontally.
Definition TLine.cxx:313
Double_t GetY1() const
Definition TLine.h:52
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Definition TLine.cxx:292
void Copy(TObject &line) const override
Copy this line to line.
Definition TLine.cxx:76
Double_t GetX2() const
Definition TLine.h:51
void Print(Option_t *option="") const override
Dump this line with its attributes.
Definition TLine.cxx:280
Double_t fX2
X of 2nd point.
Definition TLine.h:27
void SetBBoxX1(const Int_t x) override
Set left hand side of BoundingBox to a value (resize in x direction on left)
Definition TLine.cxx:453
void Paint(Option_t *option="") override
Paint this line with its current attributes.
Definition TLine.cxx:250
void SetBBoxY2(const Int_t y) override
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Definition TLine.cxx:491
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a line.
Definition TLine.cxx:89
@ kLineNDC
Use NDC coordinates.
Definition TLine.h:33
@ kHorizontal
Line is horizontal.
Definition TLine.h:35
@ kVertical
Line is vertical.
Definition TLine.h:34
virtual void SetX1(Double_t x1)
Definition TLine.h:67
TLine & operator=(const TLine &src)
Assignment operator.
Definition TLine.cxx:67
Double_t fY2
Y of 2nd point.
Definition TLine.h:28
virtual void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Draw this line with new coordinates in NDC.
Definition TLine.cxx:270
void Streamer(TBuffer &) override
Stream an object of class TLine.
Definition TLine.cxx:379
void SetBBoxCenterX(const Int_t x) override
Set X coordinate of the center of the BoundingBox.
Definition TLine.cxx:430
TClass * IsA() const override
Definition TLine.h:79
virtual void SetY1(Double_t y1)
Definition TLine.h:69
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
Definition TLine.cxx:329
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TLine.cxx:132
Double_t GetX1() const
Definition TLine.h:50
Rectangle_t GetBBox() override
Return the bounding Box of the Line.
Definition TLine.cxx:405
void SetHorizontal(Bool_t set=kTRUE)
Force the line to be drawn horizontally.
Definition TLine.cxx:339
Double_t GetY2() const
Definition TLine.h:53
Mother of all ROOT objects.
Definition TObject.h:42
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:461
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:204
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
Definition TObject.cxx:995
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition TObject.cxx:203
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:886
virtual void Copy(TObject &object) const
Copy this to obj.
Definition TObject.cxx:158
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1096
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.
Definition TObject.cxx:844
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".
Definition TObject.cxx:776
@ kCanDelete
if object in a list can be deleted
Definition TObject.h:71
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Definition TROOT.cxx:3067
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2460
TLine * line
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Double_t Sqrt(Double_t x)
Returns the square root of x.
Definition TMath.h:675
Double_t Infinity()
Returns an infinity as defined by the IEEE standard.
Definition TMath.h:930
Rectangle structure (maps to the X11 XRectangle structure)
Definition GuiTypes.h:362
TMarker m
Definition textangle.C:8
TLine l
Definition textangle.C:4