Logo ROOT   6.16/01
Reference Guide
TPad.h
Go to the documentation of this file.
1// @(#)root/gpad:$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#ifndef ROOT_TPad
13#define ROOT_TPad
14
15
16#include "TVirtualPad.h"
17#include "TAttBBox2D.h"
18#include "TPoint.h"
19#include "GuiTypes.h"
20
23class TBrowser;
24class TBox;
25class TLegend;
26class TArrow;
27
28
29class TPad : public TVirtualPad, public TAttBBox2D {
30
31private:
32 TObject *fTip; ///<! tool tip associated with box
33
34protected:
35 Double_t fX1; ///< X of lower X coordinate
36 Double_t fY1; ///< Y of lower Y coordinate
37 Double_t fX2; ///< X of upper X coordinate
38 Double_t fY2; ///< Y of upper Y coordinate
39
40 Double_t fXtoAbsPixelk; ///< Conversion coefficient for X World to absolute pixel
41 Double_t fXtoPixelk; ///< Conversion coefficient for X World to pixel
42 Double_t fXtoPixel; ///< xpixel = fXtoPixelk + fXtoPixel*xworld
43 Double_t fYtoAbsPixelk; ///< Conversion coefficient for Y World to absolute pixel
44 Double_t fYtoPixelk; ///< Conversion coefficient for Y World to pixel
45 Double_t fYtoPixel; ///< ypixel = fYtoPixelk + fYtoPixel*yworld
46
47 Double_t fUtoAbsPixelk; ///< Conversion coefficient for U NDC to absolute pixel
48 Double_t fUtoPixelk; ///< Conversion coefficient for U NDC to pixel
49 Double_t fUtoPixel; ///< xpixel = fUtoPixelk + fUtoPixel*undc
50 Double_t fVtoAbsPixelk; ///< Conversion coefficient for V NDC to absolute pixel
51 Double_t fVtoPixelk; ///< Conversion coefficient for V NDC to pixel
52 Double_t fVtoPixel; ///< ypixel = fVtoPixelk + fVtoPixel*vndc
53
54 Double_t fAbsPixeltoXk; ///< Conversion coefficient for absolute pixel to X World
55 Double_t fPixeltoXk; ///< Conversion coefficient for pixel to X World
56 Double_t fPixeltoX; ///< xworld = fPixeltoXk + fPixeltoX*xpixel
57 Double_t fAbsPixeltoYk; ///< Conversion coefficient for absolute pixel to Y World
58 Double_t fPixeltoYk; ///< Conversion coefficient for pixel to Y World
59 Double_t fPixeltoY; ///< yworld = fPixeltoYk + fPixeltoY*ypixel
60
61 Double_t fXlowNDC; ///< X bottom left corner of pad in NDC [0,1]
62 Double_t fYlowNDC; ///< Y bottom left corner of pad in NDC [0,1]
65 Double_t fWNDC; ///< Width of pad along X in NDC
66 Double_t fHNDC; ///< Height of pad along Y in NDC
67
68 Double_t fAbsXlowNDC; ///< Absolute X top left corner of pad in NDC [0,1]
69 Double_t fAbsYlowNDC; ///< Absolute Y top left corner of pad in NDC [0,1]
70 Double_t fAbsWNDC; ///< Absolute Width of pad along X in NDC
71 Double_t fAbsHNDC; ///< Absolute Height of pad along Y in NDC
72
73 Double_t fUxmin; ///< Minimum value on the X axis
74 Double_t fUymin; ///< Minimum value on the Y axis
75 Double_t fUxmax; ///< Maximum value on the X axis
76 Double_t fUymax; ///< Maximum value on the Y axis
77
78 Double_t fTheta; ///< theta angle to view as lego/surface
79 Double_t fPhi; ///< phi angle to view as lego/surface
80
81 Double_t fAspectRatio; ///< ratio of w/h in case of fixed ratio
82
83 Int_t fPixmapID; ///<! Off-screen pixmap identifier
84 Int_t fGLDevice; ///<! OpenGL off-screen pixmap identifier
87 Int_t fNumber; ///< pad number identifier
88 Int_t fTickx; ///< Set to 1 if tick marks along X
89 Int_t fTicky; ///< Set to 1 if tick marks along Y
90 Int_t fLogx; ///< (=0 if X linear scale, =1 if log scale)
91 Int_t fLogy; ///< (=0 if Y linear scale, =1 if log scale)
92 Int_t fLogz; ///< (=0 if Z linear scale, =1 if log scale)
93 Int_t fPadPaint; ///< Set to 1 while painting the pad
94 Int_t fCrosshair; ///< Crosshair type (0 if no crosshair requested)
95 Int_t fCrosshairPos; ///< Position of crosshair
96 Short_t fBorderSize; ///< pad bordersize in pixels
97 Short_t fBorderMode; ///< Bordermode (-1=down, 0 = no border, 1=up)
98 Bool_t fModified; ///< Set to true when pad is modified
99 Bool_t fGridx; ///< Set to true if grid along X
100 Bool_t fGridy; ///< Set to true if grid along Y
101 Bool_t fAbsCoord; ///< Use absolute coordinates
102 Bool_t fEditable; ///< True if canvas is editable
103 Bool_t fFixedAspectRatio; ///< True if fixed aspect ratio
104 TPad *fMother; ///<! pointer to mother of the list
105 TCanvas *fCanvas; ///<! Pointer to mother canvas
106 TList *fPrimitives; ///<->List of primitives (subpads)
107 TList *fExecs; ///< List of commands to be executed when a pad event occurs
108 TString fName; ///< Pad name
109 TString fTitle; ///< Pad title
110 TFrame *fFrame; ///<! Pointer to 2-D frame (if one exists)
111 TView *fView; ///<! Pointer to 3-D view (if one exists)
112 TObject *fPadPointer; ///<! free pointer
113 TObject *fPadView3D; ///<! 3D View of this TPad
114 static Int_t fgMaxPickDistance; ///< Maximum Pick Distance
115 Int_t fNumPaletteColor; ///< Number of objects with an automatic color
116 Int_t fNextPaletteColor; ///< Next automatic color
117 Bool_t *fCollideGrid; ///<! Grid used to find empty space when adding a box (Legend) in a pad
118 Int_t fCGnx; ///<! Size of the collide grid along x
119 Int_t fCGny; ///<! Size of the collide grid along y
120
121 // 3D Viewer support
122 TVirtualViewer3D *fViewer3D; ///<! Current 3D viewer
123
125 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
126 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
127 virtual void HideToolTip(Int_t event);
128 void PaintBorder(Color_t color, Bool_t tops);
129 virtual void PaintBorderPS(Double_t xl,Double_t yl,Double_t xt,Double_t yt,Int_t bmode,Int_t bsize,Int_t dark,Int_t light);
130 void PaintDate();
131 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
132 virtual void SetBatch(Bool_t batch=kTRUE);
133
134private:
135 TPad(const TPad &pad); // cannot copy pads, use TObject::Clone()
136 TPad &operator=(const TPad &rhs); // idem
137
139 void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y);
140 void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode);
141
143 void FillCollideGrid(TObject *o);
148 void LineNotFree(Int_t x1, Int_t x2, Int_t y1, Int_t y2);
149
150public:
151 // TPad status bits
152 enum {
153 kFraming = BIT(6), ///< Frame is requested
154 kHori = BIT(9), ///< Pad is horizontal
155 kClipFrame = BIT(10), ///< Clip on frame
156 kPrintingPS = BIT(11), ///< PS Printing
157 kCannotMove = BIT(12), ///< Fixed position
158 kClearAfterCR = BIT(14) ///< Clear after CR
159 };
160
161 TPad();
162 TPad(const char *name, const char *title, Double_t xlow,
163 Double_t ylow, Double_t xup, Double_t yup,
164 Color_t color=-1, Short_t bordersize=-1, Short_t bordermode=-2);
165 virtual ~TPad();
166 void AbsCoordinates(Bool_t set) { fAbsCoord = set; }
169 virtual void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y);
170 virtual void AddExec(const char *name, const char *command);
171 virtual void AutoExec();
172 virtual void Browse(TBrowser *b);
173 virtual TLegend *BuildLegend(Double_t x1=0.3, Double_t y1=0.21, Double_t x2=0.3, Double_t y2=0.21, const char *title="", Option_t *option = ""); // *MENU*
174 TVirtualPad* cd(Int_t subpadnumber=0); // *MENU*
175 void Clear(Option_t *option="");
176 virtual Int_t Clip(Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt);
177 virtual Int_t Clip(Double_t *x, Double_t *y, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt);
178 virtual Int_t ClippingCode(Double_t x, Double_t y, Double_t xcl1, Double_t ycl1, Double_t xcl2, Double_t ycl2);
179 virtual Int_t ClipPolygon(Int_t n, Double_t *x, Double_t *y, Int_t nn, Double_t *xc, Double_t *yc, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt);
180 virtual void Close(Option_t *option="");
181 virtual void Closed() { Emit("Closed()"); } // *SIGNAL*
182 virtual void CopyPixmap();
183 virtual void CopyPixmaps();
184 virtual void DeleteExec(const char *name);
185 virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0); // *MENU*
186 virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0);
187 virtual void Draw(Option_t *option="");
188 virtual void DrawClassObject(const TObject *obj, Option_t *option="");
189 static void DrawColorTable();
190 virtual void DrawCrosshair();
191 TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="");
192 virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis);
193 virtual TObject *FindObject(const char *name) const;
194 virtual TObject *FindObject(const TObject *obj) const;
195 virtual void UseCurrentStyle(); // *MENU*
196 virtual Short_t GetBorderMode() const { return fBorderMode;}
197 virtual Short_t GetBorderSize() const { return fBorderSize;}
198 Int_t GetCrosshair() const;
199 virtual Int_t GetCanvasID() const;
200 virtual TCanvasImp *GetCanvasImp() const;
201 TFrame *GetFrame();
202 virtual Int_t GetEvent() const;
203 virtual Int_t GetEventX() const;
204 virtual Int_t GetEventY() const;
205 virtual Color_t GetHighLightColor() const;
206 virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2);
208 virtual void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup);
209 Double_t GetXlowNDC() const {return fXlowNDC;}
210 Double_t GetYlowNDC() const {return fYlowNDC;}
211 Double_t GetWNDC() const {return fWNDC;}
212 Double_t GetHNDC() const {return fHNDC;}
213 virtual UInt_t GetWw() const;
214 virtual UInt_t GetWh() const;
217 Double_t GetAbsWNDC() const {return fAbsWNDC;}
218 Double_t GetAbsHNDC() const {return fAbsHNDC;}
220 Double_t GetPhi() const {return fPhi;}
221 Double_t GetTheta() const {return fTheta;}
222 ///Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decades.
223 Double_t GetUxmin() const {return fUxmin;}
224 ///Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decades.
225 Double_t GetUymin() const {return fUymin;}
226 ///Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decades.
227 Double_t GetUxmax() const {return fUxmax;}
228 ///Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decades.
229 Double_t GetUymax() const {return fUymax;}
230 Bool_t GetGridx() const {return fGridx;}
231 Bool_t GetGridy() const {return fGridy;}
232 Int_t GetNumber() const {return fNumber;}
233 Int_t GetTickx() const {return fTickx;}
234 Int_t GetTicky() const {return fTicky;}
235 Double_t GetX1() const { return fX1; }
236 Double_t GetX2() const { return fX2; }
237 Double_t GetY1() const { return fY1; }
238 Double_t GetY2() const { return fY2; }
239 static Int_t GetMaxPickDistance();
241 TList *GetListOfExecs() const {return fExecs;}
242 virtual TObject *GetPrimitive(const char *name) const; //obsolete, use FindObject instead
243 virtual TObject *GetSelected() const;
244 virtual TVirtualPad *GetPad(Int_t subpadnumber) const;
245 virtual TObject *GetPadPointer() const {return fPadPointer;}
246 TVirtualPad *GetPadSave() const;
249 TView *GetView() const {return fView;}
250 TObject *GetView3D() const {return fPadView3D;}// Return 3D View of this TPad
251 Int_t GetLogx() const {return fLogx;}
252 Int_t GetLogy() const {return fLogy;}
253 Int_t GetLogz() const {return fLogz;}
254 virtual TVirtualPad *GetMother() const {return fMother;}
255 const char *GetName() const {return fName.Data();}
256 const char *GetTitle() const {return fTitle.Data();}
257 virtual TCanvas *GetCanvas() const { return fCanvas; }
258 virtual TVirtualPad *GetVirtCanvas() const ;
260 Int_t GetPadPaint() const {return fPadPaint;}
261 Int_t GetPixmapID() const {return fPixmapID;}
262 ULong_t Hash() const { return fName.Hash(); }
263 virtual Bool_t HasCrosshair() const;
264 void HighLight(Color_t col=kRed, Bool_t set=kTRUE);
266 virtual Bool_t IsBatch() const;
267 virtual Bool_t IsEditable() const {return fEditable;}
268 Bool_t IsFolder() const {return kTRUE;}
269 Bool_t IsModified() const {return fModified;}
270 virtual Bool_t IsRetained() const;
271 virtual Bool_t IsVertical() const {return !TestBit(kHori);}
272 virtual void ls(Option_t *option="") const;
273 void Modified(Bool_t flag=1); // *SIGNAL*
274 virtual Bool_t OpaqueMoving() const;
275 virtual Bool_t OpaqueResizing() const;
276 Double_t PadtoX(Double_t x) const;
277 Double_t PadtoY(Double_t y) const;
278 virtual void Paint(Option_t *option="");
279 void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="");
280 void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option=""); // Obsolete
281 void PaintFillArea(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
282 void PaintFillAreaNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
284 void PaintHatches(Double_t dy, Double_t angle, Int_t nn, Double_t *xx, Double_t *yy);
287 void PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, Double_t v2);
290 void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
291 void PaintPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
293 void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
294 void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
295 void PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
296 virtual void PaintModified();
297 void PaintText(Double_t x, Double_t y, const char *text);
298 void PaintText(Double_t x, Double_t y, const wchar_t *text);
299 void PaintTextNDC(Double_t u, Double_t v, const char *text);
300 void PaintTextNDC(Double_t u, Double_t v, const wchar_t *text);
301 virtual TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj);
304 virtual void PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y);
305 virtual void Pop(); // *MENU*
306 virtual void Print(const char *filename="") const;
307 virtual void Print(const char *filename, Option_t *option);
308 virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2); // *MENU* *ARGS={x1=>fX1,y1=>fY1,x2=>fX2,y2=>fY2}
309 virtual void RangeChanged() { Emit("RangeChanged()"); } // *SIGNAL*
311 virtual void RangeAxisChanged() { Emit("RangeAxisChanged()"); } // *SIGNAL*
312 virtual void RecursiveRemove(TObject *obj);
313 virtual void RedrawAxis(Option_t *option="");
314 virtual void ResetView3D(TObject *view=0){fPadView3D=view;}
315 virtual void ResizePad(Option_t *option="");
316 virtual void Resized() { Emit("Resized()"); } // *SIGNAL*
317 virtual void SaveAs(const char *filename="",Option_t *option="") const; // *MENU*
318 virtual void SetBorderMode(Short_t bordermode) {fBorderMode = bordermode; Modified();} // *MENU*
319 virtual void SetBorderSize(Short_t bordersize) {fBorderSize = bordersize; Modified();} // *MENU*
321 virtual void SetCanvasSize(UInt_t ww, UInt_t wh);
322 virtual void SetCrosshair(Int_t crhair=1); // *TOGGLE*
323 virtual void SetCursor(ECursor cursor);
324 virtual void SetDoubleBuffer(Int_t mode=1);
325 virtual void SetDrawOption(Option_t *option="");
326 virtual void SetEditable(Bool_t mode=kTRUE); // *TOGGLE*
327 virtual void SetFixedAspectRatio(Bool_t fixed = kTRUE); // *TOGGLE*
328 virtual void SetGrid(Int_t valuex = 1, Int_t valuey = 1) {fGridx = valuex; fGridy = valuey; Modified();}
329 virtual void SetGridx(Int_t value = 1) {fGridx = value; Modified();} // *TOGGLE*
330 virtual void SetGridy(Int_t value = 1) {fGridy = value; Modified();} // *TOGGLE*
331 virtual void SetFillStyle(Style_t fstyle);
332 virtual void SetLogx(Int_t value = 1); // *TOGGLE*
333 virtual void SetLogy(Int_t value = 1); // *TOGGLE*
334 virtual void SetLogz(Int_t value = 1); // *TOGGLE*
335 virtual void SetNumber(Int_t number) {fNumber = number;}
336 virtual void SetPad(const char *name, const char *title,
337 Double_t xlow, Double_t ylow, Double_t xup,
338 Double_t yup, Color_t color=35,
339 Short_t bordersize=5, Short_t bordermode=-1);
340 virtual void SetPad(Double_t xlow, Double_t ylow, Double_t xup, Double_t yup);
341 virtual void SetAttFillPS(Color_t color, Style_t style);
342 virtual void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth);
343 virtual void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize);
344 virtual void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize);
345 static void SetMaxPickDistance(Int_t maxPick=5);
346 virtual void SetName(const char *name) {fName = name;} // *MENU*
347 virtual void SetSelected(TObject *obj);
348 virtual void SetTicks(Int_t valuex = 1, Int_t valuey = 1) {fTickx = valuex; fTicky = valuey; Modified();}
349 virtual void SetTickx(Int_t value = 1) {fTickx = value; Modified();} // *TOGGLE*
350 virtual void SetTicky(Int_t value = 1) {fTicky = value; Modified();} // *TOGGLE*
351 virtual void SetTitle(const char *title="") {fTitle = title;}
352 virtual void SetTheta(Double_t theta=30) {fTheta = theta; Modified();}
353 virtual void SetPhi(Double_t phi=30) {fPhi = phi; Modified();}
354 virtual void SetToolTipText(const char *text, Long_t delayms = 1000);
355 virtual void SetVertical(Bool_t vert=kTRUE);
356 virtual void SetView(TView *view = 0);
357 virtual void SetViewer3D(TVirtualViewer3D *viewer3d) {fViewer3D = viewer3d;}
358
359 virtual void SetGLDevice(Int_t dev) {fGLDevice = dev;}
360 virtual void SetCopyGLDevice(Bool_t copy) {fCopyGLDevice = copy;}
361
362 virtual void ShowGuidelines(TObject *object, const Int_t event, const char mode = 'i', const bool cling = true);
363 virtual void Update();
366 Int_t UtoPixel(Double_t u) const;
367 Int_t VtoPixel(Double_t v) const;
368 virtual TObject *WaitPrimitive(const char *pname="", const char *emode="");
371 Double_t XtoPad(Double_t x) const;
372 Double_t YtoPad(Double_t y) const;
373 Int_t XtoPixel(Double_t x) const;
374 Int_t YtoPixel(Double_t y) const;
375 virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const;
376 virtual void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const;
377
378 virtual TObject *CreateToolTip(const TBox *b, const char *text, Long_t delayms);
379 virtual void DeleteToolTip(TObject *tip);
380 virtual void ResetToolTip(TObject *tip);
381 virtual void CloseToolTip(TObject *tip);
382
385
386 void DrawCollideGrid();
388
389 virtual void x3d(Option_t *type=""); // Depreciated
390
391 virtual TVirtualViewer3D *GetViewer3D(Option_t * type = "");
392 virtual Bool_t HasViewer3D() const { return (fViewer3D); }
393 virtual void ReleaseViewer3D(Option_t * type = "");
394
395 virtual Rectangle_t GetBBox();
396 virtual TPoint GetBBoxCenter();
397 virtual void SetBBoxCenter(const TPoint &p);
398 virtual void SetBBoxCenterX(const Int_t x);
399 virtual void SetBBoxCenterY(const Int_t y);
400 virtual void SetBBoxX1(const Int_t x);
401 virtual void SetBBoxX2(const Int_t x);
402 virtual void SetBBoxY1(const Int_t y);
403 virtual void SetBBoxY2(const Int_t y);
404
405 virtual void RecordPave(const TObject *obj); // *SIGNAL*
406 virtual void RecordLatex(const TObject *obj); // *SIGNAL*
407 virtual void EventPave() { Emit("EventPave()"); } // *SIGNAL*
408 virtual void StartEditing() { Emit("StartEditing()"); } // *SIGNAL*
409
410 ClassDef(TPad,13) //A Graphics pad
411};
412
413
414//______________________________________________________________________________
415inline void TPad::Modified(Bool_t flag)
416{
417 if (!fModified && flag) Emit("Modified()");
418 fModified = flag;
419}
420
421
422//______________________________________________________________________________
423inline void TPad::AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
424{
425 x = AbsPixeltoX(xpixel);
426 y = AbsPixeltoY(ypixel);
427}
428
429
430//______________________________________________________________________________
432{
433 if (fAbsCoord) return fAbsPixeltoXk + px*fPixeltoX;
434 else return fPixeltoXk + px*fPixeltoX;
435}
436
437
438//______________________________________________________________________________
440{
441 if (fAbsCoord) return fAbsPixeltoYk + py*fPixeltoY;
442 else return fPixeltoYk + py*fPixeltoY;
443}
444
445
446//______________________________________________________________________________
447inline void TPad::PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
448{
449 x = PixeltoX(xpixel);
450 y = PixeltoY(ypixel);
451}
452
453
454//______________________________________________________________________________
456{
457 Double_t val;
458 if (fAbsCoord) val = fUtoAbsPixelk + u*fUtoPixel;
459 else val = u*fUtoPixel;
460 if (val < -kMaxPixel) return -kMaxPixel;
461 if (val > kMaxPixel) return kMaxPixel;
462 return Int_t(val);
463}
464
465
466//______________________________________________________________________________
468{
469 Double_t val;
470 if (fAbsCoord) val = fVtoAbsPixelk + v*fVtoPixel;
471 else val = fVtoPixelk + v*fVtoPixel;
472 if (val < -kMaxPixel) return -kMaxPixel;
473 if (val > kMaxPixel) return kMaxPixel;
474 return Int_t(val);
475}
476
477
478//______________________________________________________________________________
480{
482 if (val < -kMaxPixel) return -kMaxPixel;
483 if (val > kMaxPixel) return kMaxPixel;
484 return Int_t(val);
485}
486
487
488//______________________________________________________________________________
490{
491 Double_t val;
492 if (fAbsCoord) val = fXtoAbsPixelk + x*fXtoPixel;
493 else val = fXtoPixelk + x*fXtoPixel;
494 if (val < -kMaxPixel) return -kMaxPixel;
495 if (val > kMaxPixel) return kMaxPixel;
496 return Int_t(val);
497}
498
499
500//______________________________________________________________________________
502{
504 if (val < -kMaxPixel) return -kMaxPixel;
505 if (val > kMaxPixel) return kMaxPixel;
506 return Int_t(val);
507}
508
509
510//______________________________________________________________________________
512{
513 Double_t val;
514 if (fAbsCoord) val = fYtoAbsPixelk + y*fYtoPixel;
515 else val = fYtoPixelk + y*fYtoPixel;
516 if (val < -kMaxPixel) return -kMaxPixel;
517 if (val > kMaxPixel) return kMaxPixel;
518 return Int_t(val);
519}
520
521
522//______________________________________________________________________________
523inline void TPad::XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
524{
525 xpixel = XtoAbsPixel(x);
526 ypixel = YtoAbsPixel(y);
527}
528
529
530//______________________________________________________________________________
531inline void TPad::XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
532{
533 xpixel = XtoPixel(x);
534 ypixel = YtoPixel(y);
535}
536
537
538//______________________________________________________________________________
540{ }
541
542#endif
543
SVector< double, 2 > v
Definition: Dict.h:5
const Int_t kMaxPixel
Definition: GuiTypes.h:368
#define b(i)
Definition: RSha256.hxx:100
#define c(i)
Definition: RSha256.hxx:101
#define h(i)
Definition: RSha256.hxx:106
static double p1(double t, double a, double b)
static double p2(double t, double a, double b, double c)
static const double x2[5]
static const double x1[5]
int Int_t
Definition: RtypesCore.h:41
float Size_t
Definition: RtypesCore.h:83
unsigned int UInt_t
Definition: RtypesCore.h:42
unsigned long ULong_t
Definition: RtypesCore.h:51
long Long_t
Definition: RtypesCore.h:50
short Width_t
Definition: RtypesCore.h:78
bool Bool_t
Definition: RtypesCore.h:59
short Short_t
Definition: RtypesCore.h:35
double Double_t
Definition: RtypesCore.h:55
short Color_t
Definition: RtypesCore.h:79
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
#define BIT(n)
Definition: Rtypes.h:82
@ kRed
Definition: Rtypes.h:63
int type
Definition: TGX11.cxx:120
float xmin
Definition: THbookFile.cxx:93
float ymin
Definition: THbookFile.cxx:93
float xmax
Definition: THbookFile.cxx:93
float ymax
Definition: THbookFile.cxx:93
ECursor
Definition: TVirtualX.h:44
Draw all kinds of Arrows.
Definition: TArrow.h:29
Abstract base class for elements drawn in the editor.
Definition: TAttBBox2D.h:19
Class to manage histogram axis.
Definition: TAxis.h:30
Create a Box.
Definition: TBox.h:24
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition: TCanvasImp.h:30
The Canvas class.
Definition: TCanvas.h:31
Define a Frame.
Definition: TFrame.h:19
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:571
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:23
A doubly linked list.
Definition: TList.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
The most important graphics class in the ROOT system.
Definition: TPad.h:29
Bool_t PlaceBox(TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb)
Place a box in NDC space.
Definition: TPad.cxx:3066
void HighLight(Color_t col=kRed, Bool_t set=kTRUE)
Highlight pad.
Definition: TPad.cxx:2919
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Definition: TPad.cxx:1162
void PaintLine3D(Float_t *p1, Float_t *p2)
Paint 3-D line in the CurrentPad.
Definition: TPad.cxx:4175
virtual void Pop()
Pop pad to the top of the stack.
Definition: TPad.cxx:4598
TVirtualPad * GetSelectedPad() const
Get selected pad.
Definition: TPad.cxx:2698
virtual void CloseToolTip(TObject *tip)
Hide tool tip.
Definition: TPad.cxx:6847
virtual Int_t Clip(Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt)
Clipping routine: Cohen Sutherland algorithm.
Definition: TPad.cxx:673
void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Paint polyline in CurrentPad NDC coordinates.
Definition: TPad.cxx:4309
virtual void HideToolTip(Int_t event)
Hide tool tip depending on the event type.
Definition: TPad.cxx:2734
Double_t fAbsYlowNDC
Absolute Y top left corner of pad in NDC [0,1].
Definition: TPad.h:69
Double_t fXtoAbsPixelk
Conversion coefficient for X World to absolute pixel.
Definition: TPad.h:40
virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
"n" is the total number of sub-pads.
Definition: TPad.cxx:1261
virtual void DrawClassObject(const TObject *obj, Option_t *option="")
Draw class inheritance tree of the class to which obj belongs.
Definition: TPad.cxx:1314
virtual Bool_t IsBatch() const
Is pad in batch mode ?
Definition: TPad.cxx:2743
void PaintPadFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Paint histogram/graph frame.
Definition: TPad.cxx:3587
virtual void SetBBoxX2(const Int_t x)
Set right hand side of BoundingBox to a value (resize in x direction on right)
Definition: TPad.cxx:7064
void PaintFillAreaNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Paint fill area in CurrentPad NDC coordinates.
Definition: TPad.cxx:3870
Double_t fWNDC
Width of pad along X in NDC.
Definition: TPad.h:65
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
Definition: TPad.cxx:5851
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
Definition: TPad.cxx:3451
virtual Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
Definition: TPad.cxx:2767
Double_t YtoPad(Double_t y) const
Convert y from Y to pad.
Definition: TPad.cxx:3377
void FillCollideGrid(TObject *o)
Initialise the grid used to find empty space when adding a box (Legend) in a pad.
Definition: TPad.cxx:2998
virtual void SetGridx(Int_t value=1)
Definition: TPad.h:329
void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polyline in CurrentPad World coordinates.
Definition: TPad.cxx:4211
Double_t fPixeltoYk
Conversion coefficient for pixel to Y World.
Definition: TPad.h:58
Double_t PadtoY(Double_t y) const
Convert y from pad to Y.
Definition: TPad.cxx:3356
void PaintHatches(Double_t dy, Double_t angle, Int_t nn, Double_t *xx, Double_t *yy)
This routine draw hatches inclined with the angle "angle" and spaced of "dy" in normalized device coo...
Definition: TPad.cxx:3978
virtual void RedrawAxis(Option_t *option="")
Redraw the frame axis Redrawing axis may be necessary in case of superimposed histograms when one or ...
Definition: TPad.cxx:5232
static Int_t fgMaxPickDistance
Maximum Pick Distance.
Definition: TPad.h:114
virtual void Close(Option_t *option="")
Delete all primitives in pad and pad itself.
Definition: TPad.cxx:985
Double_t fPhi
phi angle to view as lego/surface
Definition: TPad.h:79
void DestroyExternalViewer3D()
Double_t fPixeltoY
yworld = fPixeltoYk + fPixeltoY*ypixel
Definition: TPad.h:59
virtual void RecordLatex(const TObject *obj)
Emit RecordLatex() signal.
Definition: TPad.cxx:6979
virtual void DeleteExec(const char *name)
Remove TExec name from the list of Execs.
Definition: TPad.cxx:1071
void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Paint line in normalized coordinates.
Definition: TPad.cxx:4155
Double_t fAbsXlowNDC
Absolute X top left corner of pad in NDC [0,1].
Definition: TPad.h:68
Double_t fVtoPixelk
Conversion coefficient for V NDC to pixel.
Definition: TPad.h:51
Bool_t fGridx
Set to true if grid along X.
Definition: TPad.h:99
TObject * fPadView3D
! 3D View of this TPad
Definition: TPad.h:113
virtual TObject * GetSelected() const
Get selected.
Definition: TPad.cxx:2689
void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y)
Copy pixmaps of pads laying below pad "stop" into pad "stop".
Definition: TPad.cxx:3787
virtual void SetName(const char *name)
Definition: TPad.h:346
virtual void AddExec(const char *name, const char *command)
Add a new TExec object to the list of Execs.
Definition: TPad.cxx:437
Double_t GetYlowNDC() const
Definition: TPad.h:210
Double_t GetUymin() const
Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition: TPad.h:225
TPad(const TPad &pad)
virtual void ShowGuidelines(TObject *object, const Int_t event, const char mode='i', const bool cling=true)
Shows lines to indicate if a TAttBBox2D object is aligned to the center or to another object,...
Definition: TPad.cxx:6081
virtual void StartEditing()
Definition: TPad.h:408
virtual void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup)
Return lower and upper bounds of the pad in NDC coordinates.
Definition: TPad.cxx:2885
Double_t fXtoPixel
xpixel = fXtoPixelk + fXtoPixel*xworld
Definition: TPad.h:42
TList * fExecs
List of commands to be executed when a pad event occurs.
Definition: TPad.h:107
virtual void CopyPixmaps()
Copy the sub-pixmaps of the pad to the canvas.
Definition: TPad.cxx:1055
Int_t fTickx
Set to 1 if tick marks along X.
Definition: TPad.h:88
Int_t fTicky
Set to 1 if tick marks along Y.
Definition: TPad.h:89
virtual void SetBBoxCenterY(const Int_t y)
Set Y coordinate of the center of the Pad.
Definition: TPad.cxx:7043
Int_t GetLogx() const
Definition: TPad.h:251
void AbsCoordinates(Bool_t set)
Definition: TPad.h:166
virtual void ReleaseViewer3D(Option_t *type="")
Release current (external) viewer.
Definition: TPad.cxx:6947
virtual void ResetView3D(TObject *view=0)
Definition: TPad.h:314
virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
Definition: TPad.h:523
Double_t fX2
X of upper X coordinate.
Definition: TPad.h:37
virtual Bool_t HasCrosshair() const
Return kTRUE if the crosshair has been activated (via SetCrosshair).
Definition: TPad.cxx:6374
TH1F * DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="")
Draw an empty pad frame with X and Y axis.
Definition: TPad.cxx:1566
Bool_t fEmbeddedGL
!
Definition: TPad.h:86
virtual void SetGridy(Int_t value=1)
Definition: TPad.h:330
Bool_t IsModified() const
Definition: TPad.h:269
Int_t GetPixmapID() const
Definition: TPad.h:261
Int_t fCGnx
! Size of the collide grid along x
Definition: TPad.h:118
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
Definition: TPad.cxx:5837
Double_t fPixeltoX
xworld = fPixeltoXk + fPixeltoX*xpixel
Definition: TPad.h:56
void CopyBackgroundPixmap(Int_t x, Int_t y)
Copy pixmap of this pad as background of the current pad.
Definition: TPad.cxx:3804
Bool_t fCopyGLDevice
!
Definition: TPad.h:85
Double_t fYtoPixel
ypixel = fYtoPixelk + fYtoPixel*yworld
Definition: TPad.h:45
virtual void ls(Option_t *option="") const
List all primitives in pad.
Definition: TPad.cxx:2954
Int_t YtoPixel(Double_t y) const
Definition: TPad.h:511
TPad & operator=(const TPad &rhs)
Double_t GetTheta() const
Definition: TPad.h:221
virtual Color_t GetHighLightColor() const
Get highlight color.
Definition: TPad.cxx:2673
virtual TPoint GetBBoxCenter()
Return the center of the Pad as TPoint in pixels.
Definition: TPad.cxx:7010
Double_t fAbsWNDC
Absolute Width of pad along X in NDC.
Definition: TPad.h:70
@ kCannotMove
Fixed position.
Definition: TPad.h:157
@ kClearAfterCR
Clear after CR.
Definition: TPad.h:158
@ kHori
Pad is horizontal.
Definition: TPad.h:154
@ kClipFrame
Clip on frame.
Definition: TPad.h:155
@ kPrintingPS
PS Printing.
Definition: TPad.h:156
@ kFraming
Frame is requested.
Definition: TPad.h:153
TVirtualPad * GetPadSave() const
Get save pad.
Definition: TPad.cxx:2707
virtual Int_t GetEvent() const
Get Event.
Definition: TPad.cxx:2641
Double_t GetUymax() const
Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition: TPad.h:229
virtual void SetTitle(const char *title="")
Definition: TPad.h:351
void PaintDate()
Paint the current date and time if the option date is on.
Definition: TPad.cxx:3556
virtual TVirtualViewer3D * GetViewer3D(Option_t *type="")
Create/obtain handle to 3D viewer.
Definition: TPad.cxx:6875
static void SetMaxPickDistance(Int_t maxPick=5)
static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pi...
Definition: TPad.cxx:6411
virtual Bool_t HasViewer3D() const
Definition: TPad.h:392
virtual Int_t ClippingCode(Double_t x, Double_t y, Double_t xcl1, Double_t ycl1, Double_t xcl2, Double_t ycl2)
Compute the endpoint codes for TPad::Clip.
Definition: TPad.cxx:815
Double_t fX1
X of lower X coordinate.
Definition: TPad.h:35
Int_t GetGLDevice()
Get GL device.
Definition: TPad.cxx:6963
Double_t fVtoPixel
ypixel = fVtoPixelk + fVtoPixel*vndc
Definition: TPad.h:52
Double_t GetHNDC() const
Definition: TPad.h:212
virtual void SetSelected(TObject *obj)
Set selected.
Definition: TPad.cxx:2807
virtual void SetTicks(Int_t valuex=1, Int_t valuey=1)
Definition: TPad.h:348
TView * GetView() const
Definition: TPad.h:249
virtual void PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
Definition: TPad.h:447
virtual Rectangle_t GetBBox()
Return the bounding Box of the Pad.
Definition: TPad.cxx:6996
virtual void DrawCrosshair()
Function called to draw a crosshair in the canvas.
Definition: TPad.cxx:1515
virtual void RangeChanged()
Definition: TPad.h:309
Double_t fUymin
Minimum value on the Y axis.
Definition: TPad.h:74
virtual TObject * GetPadPointer() const
Definition: TPad.h:245
virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax)
Return pad axis coordinates range.
Definition: TPad.cxx:2907
virtual void SetAttFillPS(Color_t color, Style_t style)
Set postscript fill area attributes.
Definition: TPad.cxx:5935
Int_t fLogz
(=0 if Z linear scale, =1 if log scale)
Definition: TPad.h:92
Double_t fYtoPixelk
Conversion coefficient for Y World to pixel.
Definition: TPad.h:44
virtual void CopyPixmap()
Copy the pixmap of the pad to the canvas.
Definition: TPad.cxx:1041
virtual void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this pad.
Definition: TPad.cxx:6421
TObject * GetView3D() const
Definition: TPad.h:250
TPad()
Pad default constructor.
Definition: TPad.cxx:131
virtual Int_t GetCanvasID() const
Get canvas identifier.
Definition: TPad.cxx:2625
Int_t YtoAbsPixel(Double_t y) const
Definition: TPad.h:501
Int_t GetLogz() const
Definition: TPad.h:253
virtual void SetDoubleBuffer(Int_t mode=1)
Set double buffer mode ON or OFF.
Definition: TPad.cxx:2799
static Int_t GetMaxPickDistance()
Static function (see also TPad::SetMaxPickDistance)
Definition: TPad.cxx:2681
Double_t AbsPixeltoY(Int_t py)
Definition: TPad.h:168
Int_t XtoAbsPixel(Double_t x) const
Definition: TPad.h:479
virtual void EventPave()
Definition: TPad.h:407
Double_t fUtoPixelk
Conversion coefficient for U NDC to pixel.
Definition: TPad.h:48
Double_t fPixeltoXk
Conversion coefficient for pixel to X World.
Definition: TPad.h:55
Double_t fY1
Y of lower Y coordinate.
Definition: TPad.h:36
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TPad.h:268
Double_t GetWNDC() const
Definition: TPad.h:211
Double_t GetAbsWNDC() const
Definition: TPad.h:217
Double_t GetX1() const
Definition: TPad.h:235
Int_t fGLDevice
! OpenGL off-screen pixmap identifier
Definition: TPad.h:84
const char * GetTitle() const
Returns title of object.
Definition: TPad.h:256
Double_t fYlowNDC
Y bottom left corner of pad in NDC [0,1].
Definition: TPad.h:62
const char * GetName() const
Returns name of object.
Definition: TPad.h:255
virtual Bool_t IsEditable() const
Definition: TPad.h:267
Double_t GetAspectRatio() const
Definition: TPad.h:219
virtual Int_t GetEventX() const
Get X event.
Definition: TPad.cxx:2649
Bool_t fModified
Set to true when pad is modified.
Definition: TPad.h:98
virtual void SetPad(const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=35, Short_t bordersize=5, Short_t bordermode=-1)
Set all pad parameters.
Definition: TPad.cxx:5902
Int_t GetTicky() const
Definition: TPad.h:234
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition: TPad.cxx:4479
virtual void SetNumber(Int_t number)
Definition: TPad.h:335
Int_t fNumber
pad number identifier
Definition: TPad.h:87
virtual void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth)
Set postscript line attributes.
Definition: TPad.cxx:5946
virtual void SetBatch(Bool_t batch=kTRUE)
Set pad in batch mode.
Definition: TPad.cxx:2775
virtual Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
Definition: TPad.cxx:2759
virtual void SetCopyGLDevice(Bool_t copy)
Definition: TPad.h:360
virtual void SetTheta(Double_t theta=30)
Definition: TPad.h:352
Double_t fAbsPixeltoXk
Conversion coefficient for absolute pixel to X World.
Definition: TPad.h:54
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TPad.cxx:1674
Double_t PixeltoY(Int_t py)
Definition: TPad.h:439
Double_t GetAbsHNDC() const
Definition: TPad.h:218
Double_t fAspectRatio
ratio of w/h in case of fixed ratio
Definition: TPad.h:81
virtual void RecordPave(const TObject *obj)
Emit RecordPave() signal.
Definition: TPad.cxx:6971
virtual void Browse(TBrowser *b)
Browse pad.
Definition: TPad.cxx:462
Double_t fUymax
Maximum value on the Y axis.
Definition: TPad.h:76
Double_t GetUxmax() const
Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition: TPad.h:227
virtual Int_t ClipPolygon(Int_t n, Double_t *x, Double_t *y, Int_t nn, Double_t *xc, Double_t *yc, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt)
Clip polygon using the Sutherland-Hodgman algorithm.
Definition: TPad.cxx:864
Int_t GetTickx() const
Definition: TPad.h:233
TCanvas * fCanvas
! Pointer to mother canvas
Definition: TPad.h:105
TVirtualViewer3D * fViewer3D
! Current 3D viewer
Definition: TPad.h:122
virtual void x3d(Option_t *type="")
Deprecated: use TPad::GetViewer3D() instead.
Definition: TPad.cxx:6857
virtual void SetCrosshair(Int_t crhair=1)
Set crosshair active/inactive.
Definition: TPad.cxx:6396
Bool_t Collide(Int_t i, Int_t j, Int_t w, Int_t h)
Check if a box of size w and h collide some primitives in the pad at position i,j.
Definition: TPad.cxx:3046
void SetCanvas(TCanvas *c)
Definition: TPad.h:320
virtual UInt_t GetWw() const
Get Ww.
Definition: TPad.cxx:2724
void Clear(Option_t *option="")
Delete all pad primitives.
Definition: TPad.cxx:623
Bool_t fFixedAspectRatio
True if fixed aspect ratio.
Definition: TPad.h:103
virtual void UseCurrentStyle()
Force a copy of current style for all objects in pad.
Definition: TPad.cxx:6653
virtual ~TPad()
Pad destructor.
Definition: TPad.cxx:374
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a pad and its sub-pads.
Definition: TPad.cxx:5208
virtual void SetTickx(Int_t value=1)
Definition: TPad.h:349
Double_t fVtoAbsPixelk
Conversion coefficient for V NDC to absolute pixel.
Definition: TPad.h:50
virtual void SetBBoxX1(const Int_t x)
Set lefthandside of BoundingBox to a value (resize in x direction on left)
Definition: TPad.cxx:7053
Int_t IncrementPaletteColor(Int_t i, TString opt)
Increment (i==1) or set (i>1) the number of autocolor in the pad.
Definition: TPad.cxx:2968
void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polymarker in CurrentPad World coordinates.
Definition: TPad.cxx:4347
virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)
Return pad world coordinates range.
Definition: TPad.cxx:2896
Double_t XtoPad(Double_t x) const
Convert x from X to pad.
Definition: TPad.cxx:3365
virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis)
Execute action corresponding to one event for a TAxis object (called by TAxis::ExecuteEvent....
Definition: TPad.cxx:2249
virtual void Resized()
Definition: TPad.h:316
virtual void ResetToolTip(TObject *tip)
Reset tool tip, i.e.
Definition: TPad.cxx:6836
virtual void SetBorderMode(Short_t bordermode)
Definition: TPad.h:318
virtual TObject * FindObject(const char *name) const
Search if object named name is inside this pad or in pads inside this pad.
Definition: TPad.cxx:2585
TString fTitle
Pad title.
Definition: TPad.h:109
virtual TObject * CreateToolTip(const TBox *b, const char *text, Long_t delayms)
Create a tool tip and return its pointer.
Definition: TPad.cxx:6815
virtual void PaintModified()
Traverse pad hierarchy and (re)paint only modified pads.
Definition: TPad.cxx:3606
virtual void SetBBoxY1(const Int_t y)
Set top of BoundingBox to a value (resize in y direction on top)
Definition: TPad.cxx:7073
Double_t GetX2() const
Definition: TPad.h:236
ULong_t Hash() const
Return hash value for this object.
Definition: TPad.h:262
void FillCollideGridTFrame(TObject *o)
Definition: TPad.cxx:3155
virtual void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize)
Set postscript marker attributes.
Definition: TPad.cxx:5958
virtual void SetBBoxY2(const Int_t y)
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Definition: TPad.cxx:7083
void LineNotFree(Int_t x1, Int_t x2, Int_t y1, Int_t y2)
Mark as "not free" the cells along a line.
Definition: TPad.cxx:3095
virtual void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
Definition: TPad.h:423
Double_t fAbsHNDC
Absolute Height of pad along Y in NDC.
Definition: TPad.h:71
virtual void RangeAxisChanged()
Definition: TPad.h:311
virtual void SetBBoxCenter(const TPoint &p)
Set center of the Pad.
Definition: TPad.cxx:7024
TObject * fTip
! tool tip associated with box
Definition: TPad.h:32
void Modified(Bool_t flag=1)
Definition: TPad.h:415
Double_t GetY2() const
Definition: TPad.h:238
virtual void SetCursor(ECursor cursor)
Set cursor type.
Definition: TPad.cxx:2791
virtual void SetVertical(Bool_t vert=kTRUE)
Set pad vertical (default) or horizontal.
Definition: TPad.cxx:6435
virtual void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
Definition: TPad.h:531
virtual TVirtualPad * GetVirtCanvas() const
Get virtual canvas.
Definition: TPad.cxx:2665
Double_t AbsPixeltoX(Int_t px)
Definition: TPad.h:167
virtual void AutoExec()
Execute the list of Execs when a pad event occurs.
Definition: TPad.cxx:447
Bool_t fAbsCoord
Use absolute coordinates.
Definition: TPad.h:101
Int_t fNumPaletteColor
Number of objects with an automatic color.
Definition: TPad.h:115
Double_t GetY1() const
Definition: TPad.h:237
Int_t fCrosshairPos
Position of crosshair.
Definition: TPad.h:95
virtual void SetViewer3D(TVirtualViewer3D *viewer3d)
Definition: TPad.h:357
void FillCollideGridTGraph(TObject *o)
Definition: TPad.cxx:3181
virtual void SetFixedAspectRatio(Bool_t fixed=kTRUE)
Fix pad aspect ratio to current value if fixed is true.
Definition: TPad.cxx:5782
virtual TLegend * BuildLegend(Double_t x1=0.3, Double_t y1=0.21, Double_t x2=0.3, Double_t y2=0.21, const char *title="", Option_t *option="")
Build a legend from the graphical objects in the pad.
Definition: TPad.cxx:494
virtual void Paint(Option_t *option="")
Paint all primitives in pad.
Definition: TPad.cxx:3389
void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode)
Draw Arrows to indicated equal distances of Objects with given BBoxes.
Definition: TPad.cxx:5997
Int_t fLogx
(=0 if X linear scale, =1 if log scale)
Definition: TPad.h:90
Double_t fUtoPixel
xpixel = fUtoPixelk + fUtoPixel*undc
Definition: TPad.h:49
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a box.
Definition: TPad.cxx:1087
void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Paint box in CurrentPad World coordinates.
Definition: TPad.cxx:3693
virtual TVirtualPad * GetMother() const
Definition: TPad.h:254
Int_t fCrosshair
Crosshair type (0 if no crosshair requested)
Definition: TPad.h:94
void PaintFillAreaHatches(Int_t n, Double_t *x, Double_t *y, Int_t FillStyle)
This function paints hatched fill area according to the FillStyle value The convention for the Hatch ...
Definition: TPad.cxx:3916
virtual TCanvas * GetCanvas() const
Definition: TPad.h:257
Int_t UtoPixel(Double_t u) const
Definition: TPad.h:455
Double_t fUtoAbsPixelk
Conversion coefficient for U NDC to absolute pixel.
Definition: TPad.h:47
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
Definition: TPad.h:539
Double_t GetUxmin() const
Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition: TPad.h:223
virtual TObject * WaitPrimitive(const char *pname="", const char *emode="")
Loop and sleep until a primitive with name=pname is found in the pad.
Definition: TPad.cxx:6773
TList * fPrimitives
->List of primitives (subpads)
Definition: TPad.h:106
Short_t fBorderSize
pad bordersize in pixels
Definition: TPad.h:96
virtual void Update()
Update pad.
Definition: TPad.cxx:2815
Double_t GetPhi() const
Definition: TPad.h:220
TView * fView
! Pointer to 3-D view (if one exists)
Definition: TPad.h:111
virtual Short_t GetBorderMode() const
Definition: TPad.h:196
Bool_t * fCollideGrid
! Grid used to find empty space when adding a box (Legend) in a pad
Definition: TPad.h:117
virtual void SetGLDevice(Int_t dev)
Definition: TPad.h:359
virtual void Print(const char *filename="") const
Save Pad contents in a file in one of various formats.
Definition: TPad.cxx:4633
Int_t NextPaletteColor()
Get the next autocolor in the pad.
Definition: TPad.cxx:2982
virtual TVirtualPadPainter * GetPainter()
Get pad painter from TCanvas.
Definition: TPad.cxx:6987
virtual Bool_t IsRetained() const
Is pad retained ?
Definition: TPad.cxx:2751
void FillCollideGridTBox(TObject *o)
Definition: TPad.cxx:3138
Double_t PixeltoX(Int_t px)
Definition: TPad.h:431
Double_t fTheta
theta angle to view as lego/surface
Definition: TPad.h:78
void DrawCollideGrid()
This method draws the collide grid on top of the canvas.
Definition: TPad.cxx:3294
TString fName
Pad name.
Definition: TPad.h:108
void FillCollideGridTH1(TObject *o)
Definition: TPad.cxx:3212
Int_t fPadPaint
Set to 1 while painting the pad.
Definition: TPad.h:93
static void DrawColorTable()
Static function to Display Color Table in a pad.
Definition: TPad.cxx:1611
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save Pad contents in a file in one of various formats.
Definition: TPad.cxx:5539
void PaintPolyLine3D(Int_t n, Double_t *p)
Paint 3-D polyline in the CurrentPad.
Definition: TPad.cxx:4333
TList * GetListOfPrimitives() const
Definition: TPad.h:240
Int_t fPixmapID
! Off-screen pixmap identifier
Definition: TPad.h:83
Bool_t fEditable
True if canvas is editable.
Definition: TPad.h:102
Double_t GetAbsYlowNDC() const
Definition: TPad.h:216
void PaintText(Double_t x, Double_t y, const char *text)
Paint text in CurrentPad World coordinates.
Definition: TPad.cxx:4409
virtual void RangeAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Set axis coordinate system for the pad.
Definition: TPad.cxx:5188
virtual Short_t GetBorderSize() const
Definition: TPad.h:197
Double_t PadtoX(Double_t x) const
Convert x from pad to X.
Definition: TPad.cxx:3347
Double_t fXUpNDC
Definition: TPad.h:63
Double_t GetAbsXlowNDC() const
Definition: TPad.h:215
Int_t VtoPixel(Double_t v) const
Definition: TPad.h:467
TList * GetListOfExecs() const
Definition: TPad.h:241
virtual void SetTicky(Int_t value=1)
Definition: TPad.h:350
virtual Int_t GetEventY() const
Get Y event.
Definition: TPad.cxx:2657
Bool_t GetGridx() const
Definition: TPad.h:230
Double_t fYUpNDC
Definition: TPad.h:64
Double_t fYtoAbsPixelk
Conversion coefficient for Y World to absolute pixel.
Definition: TPad.h:43
Double_t fXtoPixelk
Conversion coefficient for X World to pixel.
Definition: TPad.h:41
Int_t fLogy
(=0 if Y linear scale, =1 if log scale)
Definition: TPad.h:91
virtual void ResizePad(Option_t *option="")
Compute pad conversion coefficients.
Definition: TPad.cxx:5400
TFrame * fFrame
! Pointer to 2-D frame (if one exists)
Definition: TPad.h:110
virtual void SetView(TView *view=0)
Set the current TView. Delete previous view if view=0.
Definition: TPad.cxx:5926
Int_t GetLogy() const
Definition: TPad.h:252
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
Definition: TPad.cxx:1281
virtual void Closed()
Definition: TPad.h:181
Double_t fHNDC
Height of pad along Y in NDC.
Definition: TPad.h:66
Int_t VtoAbsPixel(Double_t v) const
Definition: TPad.h:365
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Paint line in CurrentPad World coordinates.
Definition: TPad.cxx:4130
Int_t GetCrosshair() const
Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
Definition: TPad.cxx:6383
virtual void PaintBorderPS(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t bmode, Int_t bsize, Int_t dark, Int_t light)
Paint a frame border with Postscript.
Definition: TPad.cxx:3547
Int_t fCGny
! Size of the collide grid along y
Definition: TPad.h:119
Double_t fXlowNDC
X bottom left corner of pad in NDC [0,1].
Definition: TPad.h:61
Double_t GetXlowNDC() const
Definition: TPad.h:209
Double_t fUxmin
Minimum value on the X axis.
Definition: TPad.h:73
virtual void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize)
Set postscript text attributes.
Definition: TPad.cxx:5970
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitives in this pad on the C++ source file out.
Definition: TPad.cxx:5602
Int_t XtoPixel(Double_t x) const
Definition: TPad.h:489
Int_t GetNumber() const
Definition: TPad.h:232
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Definition: TPad.h:328
virtual void SetLogz(Int_t value=1)
Set Lin/Log scale for Z.
Definition: TPad.cxx:5862
Double_t fUxmax
Maximum value on the X axis.
Definition: TPad.h:75
Int_t GetPadPaint() const
Definition: TPad.h:260
virtual void SetEditable(Bool_t mode=kTRUE)
Set pad editable yes/no If a pad is not editable:
Definition: TPad.cxx:5806
Bool_t HasFixedAspectRatio() const
Definition: TPad.h:265
Double_t fY2
Y of upper Y coordinate.
Definition: TPad.h:38
Int_t UtoAbsPixel(Double_t u) const
Definition: TPad.h:364
Double_t fAbsPixeltoYk
Conversion coefficient for absolute pixel to Y World.
Definition: TPad.h:57
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
Definition: TPad.cxx:5150
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
Definition: TPad.h:97
virtual void SetBBoxCenterX(const Int_t x)
Set X coordinate of the center of the Pad.
Definition: TPad.cxx:7034
Int_t fNextPaletteColor
Next automatic color.
Definition: TPad.h:116
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
Definition: TPad.cxx:594
TFrame * GetFrame()
Get frame.
Definition: TPad.cxx:2823
virtual Bool_t IsVertical() const
Definition: TPad.h:271
virtual TVirtualPad * GetPad(Int_t subpadnumber) const
Get a pointer to subpadnumber of this pad.
Definition: TPad.cxx:2864
virtual void DeleteToolTip(TObject *tip)
Delete tool tip object.
Definition: TPad.cxx:6825
TObject * fPadPointer
! free pointer
Definition: TPad.h:112
void PaintTextNDC(Double_t u, Double_t v, const char *text)
Paint text in CurrentPad NDC coordinates.
Definition: TPad.cxx:4435
virtual UInt_t GetWh() const
Get Wh.
Definition: TPad.cxx:2716
virtual void SetFillStyle(Style_t fstyle)
Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
Definition: TPad.cxx:5825
TPad * fMother
! pointer to mother of the list
Definition: TPad.h:104
virtual TObject * GetPrimitive(const char *name) const
Get primitive.
Definition: TPad.cxx:2847
virtual void SetBorderSize(Short_t bordersize)
Definition: TPad.h:319
virtual void SetCanvasSize(UInt_t ww, UInt_t wh)
Set canvas size.
Definition: TPad.cxx:2783
void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Definition: TPad.cxx:3813
Bool_t fGridy
Set to true if grid along Y.
Definition: TPad.h:100
Bool_t GetGridy() const
Definition: TPad.h:231
virtual void SetPhi(Double_t phi=30)
Definition: TPad.h:353
virtual TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
Definition: TPad.cxx:2633
Definition: TPoint.h:31
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:165
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
Definition: TString.cxx:626
See TView3D.
Definition: TView.h:25
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:50
Abstract 3D shapes viewer.
TText * text
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16
RooCmdArg FillStyle(Style_t style)
Print a TSeq at the prompt:
Definition: TDatime.h:115
TCanvas * style()
Definition: style.C:1