Logo ROOT  
Reference Guide
TPad Class Reference

The most important graphics class in the ROOT system.

A Pad is contained in a Canvas.

A Pad may contain other pads (unlimited pad hierarchy).

A pad is a linked list of primitives of any type (graphics objects, histograms, detectors, tracks, etc.).

Adding a new element into a pad is in general performed by the Draw member function of the object classes.

It is important to realize that the pad is a linked list of references to the original object. For example, in case of a histogram, the histogram.Draw() operation only stores a reference to the histogram object and not a graphical representation of this histogram. When the mouse is used to change (say the bin content), the bin content of the original histogram is changed.

The convention used in ROOT is that a Draw operation only adds a reference to the object. The effective drawing is performed when the canvas receives a signal to be painted.

This signal is generally sent when typing carriage return in the command input or when a graphical operation has been performed on one of the pads of this canvas. When a Canvas/Pad is repainted, the member function Paint for all objects in the Pad linked list is invoked.

When the mouse is moved on the Pad, The member function DistancetoPrimitive is called for all the elements in the pad. DistancetoPrimitive returns the distance in pixels to this object.

When the object is within the distance window, the member function ExecuteEvent is called for this object.

In ExecuteEvent, move, changes can be performed on the object.

For examples of DistancetoPrimitive and ExecuteEvent functions, see classes

virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TBox.cxx:231
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a box.
Definition: TBox.cxx:135
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TH1.cxx:3246
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
Definition: TH1.cxx:2811
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
Definition: TLine.cxx:76
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TLine.cxx:118

A Pad supports linear and log scales coordinate systems. The transformation coefficients are explained in TPad::ResizePad.

Definition at line 26 of file TPad.h.

Public Types

enum  {
  kFraming = BIT(6) , kHori = BIT(9) , kClipFrame = BIT(10) , kPrintingPS = BIT(11) ,
  kCannotMove = BIT(12) , kClearAfterCR = BIT(14)
}
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 

Public Member Functions

 TPad ()
 Pad default constructor. More...
 
 TPad (const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=-1, Short_t bordersize=-1, Short_t bordermode=-2)
 Pad constructor. More...
 
virtual ~TPad ()
 Pad destructor. More...
 
void AbsCoordinates (Bool_t set) override
  More...
 
Double_t AbsPixeltoX (Int_t px) override
  More...
 
virtual void AbsPixeltoXY (Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
  More...
 
Double_t AbsPixeltoY (Int_t py) override
  More...
 
void AddExec (const char *name, const char *command) override
 Add a new TExec object to the list of Execs. More...
 
virtual void AutoExec ()
 Execute the list of Execs when a pad event occurs. More...
 
void Browse (TBrowser *b) override
 Browse pad. More...
 
TLegendBuildLegend (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="") override
 Build a legend from the graphical objects in the pad. More...
 
TVirtualPadcd (Int_t subpadnumber=0) override
 Set Current pad. More...
 
void Clear (Option_t *option="") override
 Delete all pad primitives. More...
 
Int_t Clip (Double_t *x, Double_t *y, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt) override
 Clipping routine: Cohen Sutherland algorithm. More...
 
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. More...
 
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. More...
 
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. More...
 
void Close (Option_t *option="") override
 Delete all primitives in pad and pad itself. More...
 
virtual void Closed ()
  More...
 
void CloseToolTip (TObject *tip) override
 Hide tool tip. More...
 
void CopyPixmap () override
 Copy the pixmap of the pad to the canvas. More...
 
void CopyPixmaps () override
 Copy the sub-pixmaps of the pad to the canvas. More...
 
TObjectCreateToolTip (const TBox *b, const char *text, Long_t delayms) override
 Create a tool tip and return its pointer. More...
 
void DeleteExec (const char *name) override
 Remove TExec name from the list of Execs. More...
 
void DeleteToolTip (TObject *tip) override
 Delete tool tip object. More...
 
void Divide (Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
 Automatic pad generation by division. More...
 
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. More...
 
void Draw (Option_t *option="") override
 Draw Pad in Current pad (re-parent pad if necessary). More...
 
void DrawClassObject (const TObject *obj, Option_t *option="") override
 Draw class inheritance tree of the class to which obj belongs. More...
 
void DrawCollideGrid ()
 This method draws the collide grid on top of the canvas. More...
 
virtual void DrawCrosshair ()
 Function called to draw a crosshair in the canvas. More...
 
TH1FDrawFrame (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") override
 Draw an empty pad frame with X and Y axis. More...
 
virtual void EventPave ()
  More...
 
void ExecuteEventAxis (Int_t event, Int_t px, Int_t py, TAxis *axis) override
 Execute action corresponding to one event for a TAxis object (called by TAxis::ExecuteEvent.) This member function is called when an axis is clicked with the locator. More...
 
TObjectFindObject (const char *name) const override
 Search if object named name is inside this pad or in pads inside this pad. More...
 
TObjectFindObject (const TObject *obj) const override
 Search if obj is in pad or in pads inside this pad. More...
 
Double_t GetAbsHNDC () const override
  More...
 
Double_t GetAbsWNDC () const override
  More...
 
Double_t GetAbsXlowNDC () const override
  More...
 
Double_t GetAbsYlowNDC () const override
  More...
 
Double_t GetAspectRatio () const override
  More...
 
Rectangle_t GetBBox () override
 Return the bounding Box of the Pad. More...
 
TPoint GetBBoxCenter () override
 Return the center of the Pad as TPoint in pixels. More...
 
Short_t GetBorderMode () const override
  More...
 
Short_t GetBorderSize () const override
  More...
 
TCanvasGetCanvas () const override
  More...
 
Int_t GetCanvasID () const override
 Get canvas identifier. More...
 
TCanvasImpGetCanvasImp () const override
 Get canvas implementation pointer if any. More...
 
Int_t GetCrosshair () const
 Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair. More...
 
Int_t GetEvent () const override
 Get Event. More...
 
Int_t GetEventX () const override
 Get X event. More...
 
Int_t GetEventY () const override
 Get Y event. More...
 
TFrameGetFrame () override
 Get frame. More...
 
Int_t GetGLDevice () override
 Get GL device. More...
 
Bool_t GetGridx () const override
  More...
 
Bool_t GetGridy () const override
  More...
 
Color_t GetHighLightColor () const override
 Get highlight color. More...
 
Double_t GetHNDC () const override
 Get height of pad along Y in Normalized Coordinates (NDC) More...
 
TListGetListOfExecs () const override
  More...
 
TListGetListOfPrimitives () const override
  More...
 
Int_t GetLogx () const override
  More...
 
Int_t GetLogy () const override
  More...
 
Int_t GetLogz () const override
  More...
 
TVirtualPadGetMother () const override
  More...
 
const char * GetName () const override
 Returns name of object. More...
 
Int_t GetNumber () const override
  More...
 
TVirtualPadGetPad (Int_t subpadnumber) const override
 Get a pointer to subpadnumber of this pad. More...
 
Int_t GetPadPaint () const override
  More...
 
void GetPadPar (Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup) override
 Return lower and upper bounds of the pad in NDC coordinates. More...
 
TObjectGetPadPointer () const override
  More...
 
TVirtualPadGetPadSave () const override
 Get save pad. More...
 
TVirtualPadPainterGetPainter () override
 Get pad painter from TCanvas. More...
 
Double_t GetPhi () const override
  More...
 
Int_t GetPixmapID () const override
  More...
 
TObjectGetPrimitive (const char *name) const override
 Get primitive. More...
 
void GetRange (Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override
 Return pad world coordinates range. More...
 
void GetRangeAxis (Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) override
 Return pad axis coordinates range. More...
 
TObjectGetSelected () const override
 Get selected. More...
 
TVirtualPadGetSelectedPad () const override
 Get selected pad. More...
 
Double_t GetTheta () const override
  More...
 
Int_t GetTickx () const override
  More...
 
Int_t GetTicky () const override
  More...
 
const char * GetTitle () const override
 Returns title of object. More...
 
Double_t GetUxmax () const override
 Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decades. More...
 
Double_t GetUxmin () const override
 Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decades. More...
 
Double_t GetUymax () const override
 Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decades. More...
 
Double_t GetUymin () const override
 Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decades. More...
 
TViewGetView () const override
  More...
 
TObjectGetView3D () const override
  More...
 
TVirtualViewer3DGetViewer3D (Option_t *type="") override
 Create/obtain handle to 3D viewer. More...
 
TVirtualPadGetVirtCanvas () const override
 Get virtual canvas. More...
 
UInt_t GetWh () const override
 Get Wh. More...
 
Double_t GetWNDC () const override
 Get width of pad along X in Normalized Coordinates (NDC) More...
 
UInt_t GetWw () const override
 Get Ww. More...
 
Double_t GetX1 () const override
  More...
 
Double_t GetX2 () const override
  More...
 
Double_t GetXlowNDC () const override
  More...
 
Double_t GetY1 () const override
  More...
 
Double_t GetY2 () const override
  More...
 
Double_t GetYlowNDC () const override
  More...
 
Bool_t HasCrosshair () const override
 Return kTRUE if the crosshair has been activated (via SetCrosshair). More...
 
Bool_t HasFixedAspectRatio () const override
  More...
 
ULong_t Hash () const override
 Return hash value for this object. More...
 
Bool_t HasViewer3D () const override
  More...
 
void HighLight (Color_t col=kRed, Bool_t set=kTRUE) override
 Highlight pad. More...
 
Int_t IncrementPaletteColor (Int_t i, TString opt) override
 Increment (i==1) or set (i>1) the number of autocolor in the pad. More...
 
Bool_t IsBatch () const override
 Is pad in batch mode ? More...
 
virtual Bool_t IsEditable () const override
  More...
 
Bool_t IsFolder () const override
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
Bool_t IsModified () const override
  More...
 
Bool_t IsRetained () const override
 Is pad retained ? More...
 
Bool_t IsVertical () const override
  More...
 
void ls (Option_t *option="") const override
 List all primitives in pad. More...
 
void Modified (Bool_t flag=1) override
  More...
 
Int_t NextPaletteColor () override
 Get the next autocolor in the pad. More...
 
Bool_t OpaqueMoving () const override
 Is pad moving in opaque mode ? More...
 
Bool_t OpaqueResizing () const override
 Is pad resizing in opaque mode ? More...
 
Double_t PadtoX (Double_t x) const override
 Convert x from pad to X. More...
 
Double_t PadtoY (Double_t y) const override
 Convert y from pad to Y. More...
 
void Paint (Option_t *option="") override
 Paint all primitives in pad. More...
 
void PaintBox (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="") override
 Paint box in CurrentPad World coordinates. More...
 
void PaintFillArea (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint fill area in CurrentPad World coordinates. More...
 
void PaintFillArea (Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
  More...
 
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 is the following: More...
 
void PaintFillAreaNDC (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint fill area in CurrentPad NDC coordinates. More...
 
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 coordinates in the surface defined by n,xx,yy. More...
 
void PaintLine (Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
 Paint line in CurrentPad World coordinates. More...
 
void PaintLine3D (Double_t *p1, Double_t *p2) override
 Paint 3-D line in the CurrentPad. More...
 
void PaintLine3D (Float_t *p1, Float_t *p2) override
 Paint 3-D line in the CurrentPad. More...
 
void PaintLineNDC (Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
 Paint line in normalized coordinates. More...
 
void PaintModified () override
 Traverse pad hierarchy and (re)paint only modified pads. More...
 
void PaintPadFrame (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
 Paint histogram/graph frame. More...
 
void PaintPolyLine (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint polyline in CurrentPad World coordinates. More...
 
void PaintPolyLine (Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
 Paint polyline in CurrentPad World coordinates. More...
 
void PaintPolyLine3D (Int_t n, Double_t *p) override
 Paint 3-D polyline in the CurrentPad. More...
 
void PaintPolyLineNDC (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint polyline in CurrentPad NDC coordinates. More...
 
void PaintPolyMarker (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint polymarker in CurrentPad World coordinates. More...
 
void PaintPolyMarker (Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
 Paint polymarker in CurrentPad World coordinates. More...
 
void PaintText (Double_t x, Double_t y, const char *text) override
 Paint text in CurrentPad World coordinates. More...
 
void PaintText (Double_t x, Double_t y, const wchar_t *text) override
 Paint text in CurrentPad World coordinates. More...
 
void PaintTextNDC (Double_t u, Double_t v, const char *text) override
 Paint text in CurrentPad NDC coordinates. More...
 
void PaintTextNDC (Double_t u, Double_t v, const wchar_t *text) override
 Paint text in CurrentPad NDC coordinates. More...
 
virtual TPadPick (Int_t px, Int_t py, TObjLink *&pickobj)
 Search for an object at pixel position px,py. More...
 
Double_t PixeltoX (Int_t px) override
  More...
 
virtual void PixeltoXY (Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
  More...
 
Double_t PixeltoY (Int_t py) override
  More...
 
Bool_t PlaceBox (TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb) override
 Place a box in NDC space. More...
 
void Pop () override
 Pop pad to the top of the stack. More...
 
void Print (const char *filename, Option_t *option) override
 Save Canvas contents in a file in one of various formats. More...
 
void Print (const char *filename="") const override
 Save Pad contents in a file in one of various formats. More...
 
void Range (Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
 Set world coordinate system for the pad. More...
 
void RangeAxis (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
 Set axis coordinate system for the pad. More...
 
virtual void RangeAxisChanged ()
  More...
 
virtual void RangeChanged ()
  More...
 
virtual void RecordLatex (const TObject *obj)
 Emit RecordLatex() signal. More...
 
virtual void RecordPave (const TObject *obj)
 Emit RecordPave() signal. More...
 
void RecursiveRemove (TObject *obj) override
 Recursively remove object from a pad and its sub-pads. More...
 
void RedrawAxis (Option_t *option="") override
 Redraw the frame axis. More...
 
void ReleaseViewer3D (Option_t *type="") override
 Release current (external) viewer. More...
 
void ResetToolTip (TObject *tip) override
 Reset tool tip, i.e. More...
 
void ResetView3D (TObject *view=nullptr) override
  More...
 
virtual void Resized ()
  More...
 
void ResizePad (Option_t *option="") override
 Compute pad conversion coefficients. More...
 
void SaveAs (const char *filename="", Option_t *option="") const override
 Save Pad contents in a file in one of various formats. More...
 
void SetAttFillPS (Color_t color, Style_t style) override
 Set postscript fill area attributes. More...
 
void SetAttLinePS (Color_t color, Style_t style, Width_t lwidth) override
 Set postscript line attributes. More...
 
void SetAttMarkerPS (Color_t color, Style_t style, Size_t msize) override
 Set postscript marker attributes. More...
 
void SetAttTextPS (Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize) override
 Set postscript text attributes. More...
 
void SetBBoxCenter (const TPoint &p) override
 Set center of the Pad. More...
 
void SetBBoxCenterX (const Int_t x) override
 Set X coordinate of the center of the Pad. More...
 
void SetBBoxCenterY (const Int_t y) override
 Set Y coordinate of the center of the Pad. More...
 
void SetBBoxX1 (const Int_t x) override
 Set lefthandside of BoundingBox to a value (resize in x direction on left) More...
 
void SetBBoxX2 (const Int_t x) override
 Set right hand side of BoundingBox to a value (resize in x direction on right) More...
 
void SetBBoxY1 (const Int_t y) override
 Set top of BoundingBox to a value (resize in y direction on top) More...
 
void SetBBoxY2 (const Int_t y) override
 Set bottom of BoundingBox to a value (resize in y direction on bottom) More...
 
void SetBorderMode (Short_t bordermode) override
  More...
 
void SetBorderSize (Short_t bordersize) override
  More...
 
void SetCanvas (TCanvas *c) override
  More...
 
void SetCanvasSize (UInt_t ww, UInt_t wh) override
 Set canvas size. More...
 
void SetCopyGLDevice (Bool_t copy) override
  More...
 
void SetCrosshair (Int_t crhair=1) override
 Set crosshair active/inactive. More...
 
void SetCursor (ECursor cursor) override
 Set cursor type. More...
 
void SetDoubleBuffer (Int_t mode=1) override
 Set double buffer mode ON or OFF. More...
 
void SetDrawOption (Option_t *option="") override
 Set drawing option for object. More...
 
void SetEditable (Bool_t mode=kTRUE) override
 Set pad editable yes/no If a pad is not editable: More...
 
void SetFillStyle (Style_t fstyle) override
 Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000. More...
 
void SetFixedAspectRatio (Bool_t fixed=kTRUE) override
 Fix pad aspect ratio to current value if fixed is true. More...
 
virtual void SetGLDevice (Int_t dev)
  More...
 
void SetGrid (Int_t valuex=1, Int_t valuey=1) override
  More...
 
void SetGridx (Int_t value=1) override
  More...
 
void SetGridy (Int_t value=1) override
  More...
 
void SetLogx (Int_t value=1) override
 Set Lin/Log scale for X. More...
 
void SetLogy (Int_t value=1) override
 Set Lin/Log scale for Y. More...
 
void SetLogz (Int_t value=1) override
 Set Lin/Log scale for Z. More...
 
void SetName (const char *name) override
  More...
 
virtual void SetNumber (Int_t number)
  More...
 
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) override
 Set all pad parameters. More...
 
void SetPad (Double_t xlow, Double_t ylow, Double_t xup, Double_t yup) override
 Set canvas range for pad and resize the pad. More...
 
void SetPhi (Double_t phi=30) override
  More...
 
void SetSelected (TObject *obj) override
 Set selected. More...
 
void SetTheta (Double_t theta=30) override
  More...
 
void SetTicks (Int_t valuex=1, Int_t valuey=1) override
  More...
 
void SetTickx (Int_t value=1) override
  More...
 
void SetTicky (Int_t value=1) override
  More...
 
void SetTitle (const char *title="") override
  More...
 
void SetToolTipText (const char *text, Long_t delayms=1000) override
 Set tool tip text associated with this pad. More...
 
void SetVertical (Bool_t vert=kTRUE) override
 Set pad vertical (default) or horizontal. More...
 
void SetView (TView *view=nullptr) override
 Set the current TView. Delete previous view if view=0. More...
 
void SetViewer3D (TVirtualViewer3D *viewer3d) override
  More...
 
void ShowGuidelines (TObject *object, const Int_t event, const char mode='i', const bool cling=true) override
 Shows lines to indicate if a TAttBBox2D object is aligned to the center or to another object, shows distance arrows if two objects on screen have the same distance to another object Call from primitive in Execute Event, in ButtonMotion after the new coordinates have been set, to 'stick' once when button is up to delete lines. More...
 
virtual void StartEditing ()
  More...
 
void Update () override
 Update pad. More...
 
void UseCurrentStyle () override
 Force a copy of current style for all objects in pad. More...
 
Int_t UtoAbsPixel (Double_t u) const override
  More...
 
Int_t UtoPixel (Double_t u) const override
  More...
 
Int_t VtoAbsPixel (Double_t v) const override
  More...
 
Int_t VtoPixel (Double_t v) const override
  More...
 
TObjectWaitPrimitive (const char *pname="", const char *emode="") override
 Loop and sleep until a primitive with name=pname is found in the pad. More...
 
virtual void x3d (Option_t *type="")
 Deprecated: use TPad::GetViewer3D() instead. More...
 
Int_t XtoAbsPixel (Double_t x) const override
  More...
 
Double_t XtoPad (Double_t x) const override
 Convert x from X to pad. More...
 
Int_t XtoPixel (Double_t x) const override
  More...
 
virtual void XYtoAbsPixel (Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
  More...
 
virtual void XYtoPixel (Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
  More...
 
Int_t YtoAbsPixel (Double_t y) const override
  More...
 
Double_t YtoPad (Double_t y) const override
 Convert y from Y to pad. More...
 
Int_t YtoPixel (Double_t y) const override
  More...
 
- Public Member Functions inherited from TVirtualPad
 TVirtualPad ()
 VirtualPad default constructor. More...
 
 TVirtualPad (const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=19, Short_t bordersize=4, Short_t bordermode=1)
 VirtualPad constructor. More...
 
virtual ~TVirtualPad ()
 VirtualPad destructor. More...
 
Bool_t IsBeingResized () const
  More...
 
virtual Bool_t PadInHighlightMode () const
 Should always return false, unless you can highlight selected object in pad. More...
 
virtual Bool_t PadInSelectionMode () const
 Should always return false unless you have non-standard picking. More...
 
virtual void PopTopLevelSelectable ()
 Does nothing, unless you implement your own picking. More...
 
virtual void PushSelectableObject (TObject *obj)
 Does nothing, unless you implement your own picking. More...
 
virtual void PushTopLevelSelectable (TObject *top)
 Does nothing, unless you implement your own picking. More...
 
virtual void UnZoomed ()
  More...
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
  More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
  More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
  More...
 
virtual Bool_t IsSortable () const
  More...
 
R__ALWAYS_INLINE Bool_t IsZombie () const
  More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
  More...
 
voidoperator new (size_t sz, void *vp)
  More...
 
voidoperator new[] (size_t sz)
  More...
 
voidoperator new[] (size_t sz, void *vp)
  More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
void ResetBit (UInt_t f)
  More...
 
void SetBit (UInt_t f)
  More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
  More...
 
Int_t TestBits (UInt_t f) const
  More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
- Public Member Functions inherited from TAttLine
 TAttLine ()
 AttLine default constructor. More...
 
 TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth)
 AttLine normal constructor. More...
 
virtual ~TAttLine ()
 AttLine destructor. More...
 
void Copy (TAttLine &attline) const
 Copy this line attributes to a new TAttLine. More...
 
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. More...
 
virtual Color_t GetLineColor () const
 Return the line color. More...
 
virtual Style_t GetLineStyle () const
 Return the line style. More...
 
virtual Width_t GetLineWidth () const
 Return the line width. More...
 
virtual void Modify ()
 Change current line attributes if necessary. More...
 
virtual void ResetAttLine (Option_t *option="")
 Reset this line attributes to default values. More...
 
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. More...
 
virtual void SetLineAttributes ()
 Invoke the DialogCanvas Line attributes. More...
 
virtual void SetLineColor (Color_t lcolor)
 Set the line color. More...
 
virtual void SetLineColorAlpha (Color_t lcolor, Float_t lalpha)
 Set a transparent line color. More...
 
virtual void SetLineStyle (Style_t lstyle)
 Set the line style. More...
 
virtual void SetLineWidth (Width_t lwidth)
 Set the line width. More...
 
- Public Member Functions inherited from TAttFill
 TAttFill ()
 AttFill default constructor. More...
 
 TAttFill (Color_t fcolor, Style_t fstyle)
 AttFill normal constructor. More...
 
virtual ~TAttFill ()
 AttFill destructor. More...
 
void Copy (TAttFill &attfill) const
 Copy this fill attributes to a new TAttFill. More...
 
virtual Color_t GetFillColor () const
 Return the fill area color. More...
 
virtual Style_t GetFillStyle () const
 Return the fill area style. More...
 
virtual Bool_t IsTransparent () const
  More...
 
virtual void Modify ()
 Change current fill area attributes if necessary. More...
 
virtual void ResetAttFill (Option_t *option="")
 Reset this fill attributes to default values. More...
 
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. More...
 
virtual void SetFillAttributes ()
 Invoke the DialogCanvas Fill attributes. More...
 
virtual void SetFillColor (Color_t fcolor)
 Set the fill area color. More...
 
virtual void SetFillColorAlpha (Color_t fcolor, Float_t falpha)
 Set a transparent fill color. More...
 
- Public Member Functions inherited from TAttPad
 TAttPad ()
 Constructor. More...
 
virtual ~TAttPad ()
 Destructor. More...
 
virtual void Copy (TAttPad &attpad) const
 copy function More...
 
Float_t GetAfile () const
  More...
 
Float_t GetAstat () const
  More...
 
Float_t GetBottomMargin () const
  More...
 
Int_t GetFrameBorderMode () const
  More...
 
Width_t GetFrameBorderSize () const
  More...
 
Color_t GetFrameFillColor () const
  More...
 
Style_t GetFrameFillStyle () const
  More...
 
Color_t GetFrameLineColor () const
  More...
 
Style_t GetFrameLineStyle () const
  More...
 
Width_t GetFrameLineWidth () const
  More...
 
Float_t GetLeftMargin () const
  More...
 
Float_t GetRightMargin () const
  More...
 
Float_t GetTopMargin () const
  More...
 
Float_t GetXfile () const
  More...
 
Float_t GetXstat () const
  More...
 
Float_t GetYfile () const
  More...
 
Float_t GetYstat () const
  More...
 
virtual void ResetAttPad (Option_t *option="")
 Reset pad attributes. More...
 
virtual void SetAfile (Float_t afile)
  More...
 
virtual void SetAstat (Float_t astat)
  More...
 
virtual void SetBottomMargin (Float_t bottommargin)
 Set Pad bottom margin in fraction of the pad height. More...
 
void SetFrameBorderMode (Int_t mode=1)
  More...
 
void SetFrameBorderSize (Width_t size=1)
  More...
 
void SetFrameFillColor (Color_t color=1)
  More...
 
void SetFrameFillStyle (Style_t styl=0)
  More...
 
void SetFrameLineColor (Color_t color=1)
  More...
 
void SetFrameLineStyle (Style_t styl=0)
  More...
 
void SetFrameLineWidth (Width_t width=1)
  More...
 
virtual void SetLeftMargin (Float_t leftmargin)
 Set Pad left margin in fraction of the pad width. More...
 
virtual void SetMargin (Float_t left, Float_t right, Float_t bottom, Float_t top)
 Set all margins. More...
 
virtual void SetRightMargin (Float_t rightmargin)
 Set Pad right margin in fraction of the pad width. More...
 
virtual void SetTopMargin (Float_t topmargin)
 Set Pad top margin in fraction of the pad height. More...
 
virtual void SetXfile (Float_t xfile)
  More...
 
virtual void SetXstat (Float_t xstat)
  More...
 
virtual void SetYfile (Float_t yfile)
  More...
 
virtual void SetYstat (Float_t ystat)
  More...
 
- Public Member Functions inherited from TQObject
 TQObject ()
 TQObject Constructor. More...
 
virtual ~TQObject ()
 TQObject Destructor. More...
 
Bool_t AreSignalsBlocked () const
  More...
 
Bool_t BlockSignals (Bool_t b)
  More...
 
virtual void ChangedBy (const char *method)
  More...
 
void CollectClassSignalLists (TList &list, TClass *cls)
 Collect class signal lists from class cls and all its base-classes. More...
 
Bool_t Connect (const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Non-static method is used to connect from the signal of this object to the receiver slot. More...
 
virtual void Connected (const char *)
  More...
 
virtual void Destroyed ()
  More...
 
Bool_t Disconnect (const char *signal=0, void *receiver=0, const char *slot=0)
 Disconnects signal of this object from slot of receiver. More...
 
virtual void Disconnected (const char *)
  More...
 
void Emit (const char *signal)
 Activate signal without args. More...
 
template<typename T >
void Emit (const char *signal, const T &arg)
 Activate signal with single parameter. More...
 
template<typename... T>
void EmitVA (const char *signal_name, Int_t, const T &... params)
 Emit a signal with a varying number of arguments. More...
 
TListGetListOfClassSignals () const
 Returns pointer to list of signals of this class. More...
 
TListGetListOfConnections () const
  More...
 
TListGetListOfSignals () const
  More...
 
virtual Bool_t HasConnection (const char *signal_name) const
 Return true if there is any object connected to this signal. More...
 
virtual void HighPriority (const char *signal_name, const char *slot_name=0)
  More...
 
virtual void LowPriority (const char *signal_name, const char *slot_name=0)
  More...
 
virtual void Message (const char *msg)
  More...
 
virtual Int_t NumberOfConnections () const
 Return number of connections for this object. More...
 
virtual Int_t NumberOfSignals () const
 Return number of signals for this object. More...
 
- Public Member Functions inherited from TAttBBox2D
virtual ~TAttBBox2D ()
  More...
 

Static Public Member Functions

static void DrawColorTable ()
 Static function to Display Color Table in a pad. More...
 
static Int_t GetMaxPickDistance ()
 Static function (see also TPad::SetMaxPickDistance) More...
 
static void SetMaxPickDistance (Int_t maxPick=5)
 static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pick to select an object if its DistancetoPrimitive returns a value < fgMaxPickDistance The default value is 5 pixels. More...
 
- Static Public Member Functions inherited from TVirtualPad
static TVirtualPad *& Pad ()
 Return the current pad for the current thread. More...
 
- Static Public Member Functions inherited from TObject
static Longptr_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Static Public Member Functions inherited from TQObject
static Bool_t AreAllSignalsBlocked ()
 Returns true if all signals are blocked. More...
 
static Bool_t BlockAllSignals (Bool_t b)
 Block or unblock all signals. Returns the previous block status. More...
 
static Bool_t Connect (const char *sender_class, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 This method allows to make a connection from any object of the same class to a single slot. More...
 
static Bool_t Connect (TQObject *sender, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver. More...
 
static Bool_t Disconnect (const char *class_name, const char *signal, void *receiver=0, const char *slot=0)
 Disconnects "class signal". More...
 
static Bool_t Disconnect (TQObject *sender, const char *signal=0, void *receiver=0, const char *slot=0)
 Disconnects signal in object sender from slot_method in object receiver. More...
 

Protected Member Functions

void DestroyExternalViewer3D ()
  More...
 
Int_t DistancetoPrimitive (Int_t px, Int_t py) override
 Compute distance from point px,py to a box. More...
 
void ExecuteEvent (Int_t event, Int_t px, Int_t py) override
 Execute action corresponding to one event. More...
 
virtual void HideToolTip (Int_t event)
 Hide tool tip depending on the event type. More...
 
void PaintBorder (Color_t color, Bool_t tops)
 Paint the pad border. More...
 
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) override
 Paint a frame border with Postscript. More...
 
void PaintDate ()
 Paint the current date and time if the option date is on. More...
 
void SavePrimitive (std::ostream &out, Option_t *option="") override
 Save primitives in this pad on the C++ source file out. More...
 
void SetBatch (Bool_t batch=kTRUE) override
 Set pad in batch mode. More...
 
- Protected Member Functions inherited from TVirtualPad
voidGetSender () override
 true when resizing the pad More...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
  More...
 
- Protected Member Functions inherited from TQObject
virtual const char * GetSenderClassName () const
  More...
 

Protected Attributes

Bool_t fAbsCoord
 Use absolute coordinates. More...
 
Double_t fAbsHNDC
 Absolute Height of pad along Y in NDC. More...
 
Double_t fAbsPixeltoXk
 Conversion coefficient for absolute pixel to X World. More...
 
Double_t fAbsPixeltoYk
 Conversion coefficient for absolute pixel to Y World. More...
 
Double_t fAbsWNDC
 Absolute Width of pad along X in NDC. More...
 
Double_t fAbsXlowNDC
 Absolute X top left corner of pad in NDC [0,1]. More...
 
Double_t fAbsYlowNDC
 Absolute Y top left corner of pad in NDC [0,1]. More...
 
Double_t fAspectRatio
 ratio of w/h in case of fixed ratio More...
 
Short_t fBorderMode
 Bordermode (-1=down, 0 = no border, 1=up) More...
 
Short_t fBorderSize
 pad bordersize in pixels More...
 
TCanvasfCanvas
 ! Pointer to mother canvas More...
 
Int_t fCGnx
 ! Size of the collide grid along x More...
 
Int_t fCGny
 ! Size of the collide grid along y More...
 
Bool_tfCollideGrid
 ! Grid used to find empty space when adding a box (Legend) in a pad More...
 
Bool_t fCopyGLDevice
 ! More...
 
Int_t fCrosshair
 Crosshair type (0 if no crosshair requested) More...
 
Int_t fCrosshairPos
 Position of crosshair. More...
 
Bool_t fEditable
 True if canvas is editable. More...
 
Bool_t fEmbeddedGL
 ! More...
 
TListfExecs
 List of commands to be executed when a pad event occurs. More...
 
Bool_t fFixedAspectRatio
 True if fixed aspect ratio. More...
 
TFramefFrame
 ! Pointer to 2-D frame (if one exists) More...
 
Int_t fGLDevice
 ! OpenGL off-screen pixmap identifier More...
 
Bool_t fGridx
 Set to true if grid along X. More...
 
Bool_t fGridy
 Set to true if grid along Y. More...
 
Double_t fHNDC
 Height of pad along Y in Normalized Coordinates (NDC) More...
 
Int_t fLogx
 (=0 if X linear scale, =1 if log scale) More...
 
Int_t fLogy
 (=0 if Y linear scale, =1 if log scale) More...
 
Int_t fLogz
 (=0 if Z linear scale, =1 if log scale) More...
 
Bool_t fModified
 Set to true when pad is modified. More...
 
TPadfMother
 ! pointer to mother of the list More...
 
TString fName
 Pad name. More...
 
Int_t fNextPaletteColor
 Next automatic color. More...
 
Int_t fNumber
 pad number identifier More...
 
Int_t fNumPaletteColor
 Number of objects with an automatic color. More...
 
Int_t fPadPaint
 Set to 1 while painting the pad. More...
 
TObjectfPadPointer
 ! free pointer More...
 
TObjectfPadView3D
 ! 3D View of this TPad More...
 
Double_t fPhi
 phi angle to view as lego/surface More...
 
Double_t fPixeltoX
 xworld = fPixeltoXk + fPixeltoX*xpixel More...
 
Double_t fPixeltoXk
 Conversion coefficient for pixel to X World. More...
 
Double_t fPixeltoY
 yworld = fPixeltoYk + fPixeltoY*ypixel More...
 
Double_t fPixeltoYk
 Conversion coefficient for pixel to Y World. More...
 
Int_t fPixmapID
 ! Off-screen pixmap identifier More...
 
TListfPrimitives
 ->List of primitives (subpads) More...
 
Double_t fTheta
 theta angle to view as lego/surface More...
 
Int_t fTickx
 Set to 1 if tick marks along X. More...
 
Int_t fTicky
 Set to 1 if tick marks along Y. More...
 
TString fTitle
 Pad title. More...
 
Double_t fUtoAbsPixelk
 Conversion coefficient for U NDC to absolute pixel. More...
 
Double_t fUtoPixel
 xpixel = fUtoPixelk + fUtoPixel*undc More...
 
Double_t fUtoPixelk
 Conversion coefficient for U NDC to pixel. More...
 
Double_t fUxmax
 Maximum value on the X axis. More...
 
Double_t fUxmin
 Minimum value on the X axis. More...
 
Double_t fUymax
 Maximum value on the Y axis. More...
 
Double_t fUymin
 Minimum value on the Y axis. More...
 
TViewfView
 ! Pointer to 3-D view (if one exists) More...
 
TVirtualViewer3DfViewer3D
 ! Current 3D viewer More...
 
Double_t fVtoAbsPixelk
 Conversion coefficient for V NDC to absolute pixel. More...
 
Double_t fVtoPixel
 ypixel = fVtoPixelk + fVtoPixel*vndc More...
 
Double_t fVtoPixelk
 Conversion coefficient for V NDC to pixel. More...
 
Double_t fWNDC
 Width of pad along X in Normalized Coordinates (NDC) More...
 
Double_t fX1
 X of lower X coordinate. More...
 
Double_t fX2
 X of upper X coordinate. More...
 
Double_t fXlowNDC
 X bottom left corner of pad in NDC [0,1]. More...
 
Double_t fXtoAbsPixelk
 Conversion coefficient for X World to absolute pixel. More...
 
Double_t fXtoPixel
 xpixel = fXtoPixelk + fXtoPixel*xworld More...
 
Double_t fXtoPixelk
 Conversion coefficient for X World to pixel. More...
 
Double_t fXUpNDC
  More...
 
Double_t fY1
 Y of lower Y coordinate. More...
 
Double_t fY2
 Y of upper Y coordinate. More...
 
Double_t fYlowNDC
 Y bottom left corner of pad in NDC [0,1]. More...
 
Double_t fYtoAbsPixelk
 Conversion coefficient for Y World to absolute pixel. More...
 
Double_t fYtoPixel
 ypixel = fYtoPixelk + fYtoPixel*yworld More...
 
Double_t fYtoPixelk
 Conversion coefficient for Y World to pixel. More...
 
Double_t fYUpNDC
  More...
 
- Protected Attributes inherited from TVirtualPad
Bool_t fResizing
  More...
 
- Protected Attributes inherited from TAttLine
Color_t fLineColor
 Line color. More...
 
Style_t fLineStyle
 Line style. More...
 
Width_t fLineWidth
 Line width. More...
 
- Protected Attributes inherited from TAttFill
Color_t fFillColor
 Fill area color. More...
 
Style_t fFillStyle
 Fill area style. More...
 
- Protected Attributes inherited from TAttPad
Float_t fAfile
 Alignment for the file name. More...
 
Float_t fAstat
 Alignment for the statistics. More...
 
Float_t fBottomMargin
 BottomMargin. More...
 
Int_t fFrameBorderMode
 Pad frame border mode. More...
 
Width_t fFrameBorderSize
 Pad frame border size. More...
 
Color_t fFrameFillColor
 Pad frame fill color. More...
 
Style_t fFrameFillStyle
 Pad frame fill style. More...
 
Color_t fFrameLineColor
 Pad frame line color. More...
 
Style_t fFrameLineStyle
 Pad frame line style. More...
 
Width_t fFrameLineWidth
 Pad frame line width. More...
 
Float_t fLeftMargin
 LeftMargin. More...
 
Float_t fRightMargin
 RightMargin. More...
 
Float_t fTopMargin
 TopMargin. More...
 
Float_t fXfile
 X position where to draw the file name. More...
 
Float_t fXstat
 X position where to draw the statistics. More...
 
Float_t fYfile
 Y position where to draw the file name. More...
 
Float_t fYstat
 Y position where to draw the statistics. More...
 
- Protected Attributes inherited from TQObject
TListfListOfConnections
 list of signals from this object More...
 
TListfListOfSignals
  More...
 
Bool_t fSignalsBlocked
 list of connections to this object More...
 

Static Protected Attributes

static Int_t fgMaxPickDistance = 5
 Maximum Pick Distance. More...
 
- Static Protected Attributes inherited from TQObject
static Bool_t fgAllSignalsBlocked = kFALSE
 flag used for suppression of signals More...
 

Private Member Functions

 TPad (const TPad &pad)=delete
  More...
 
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. More...
 
void CopyBackgroundPixmap (Int_t x, Int_t y)
 Copy pixmap of this pad as background of the current pad. More...
 
void CopyBackgroundPixmaps (TPad *start, TPad *stop, Int_t x, Int_t y)
 Copy pixmaps of pads laying below pad "stop" into pad "stop". More...
 
void DrawDist (Rectangle_t aBBox, Rectangle_t bBBox, char mode)
 Draw Arrows to indicated equal distances of Objects with given BBoxes. More...
 
void FillCollideGrid (TObject *o)
 Initialise the grid used to find empty space when adding a box (Legend) in a pad. More...
 
void FillCollideGridTBox (TObject *o)
  More...
 
void FillCollideGridTFrame (TObject *o)
  More...
 
void FillCollideGridTGraph (TObject *o)
  More...
 
void FillCollideGridTH1 (TObject *o)
  More...
 
void LineNotFree (Int_t x1, Int_t x2, Int_t y1, Int_t y2)
 Mark as "not free" the cells along a line. More...
 
TPadoperator= (const TPad &rhs)=delete
  More...
 

Private Attributes

TObjectfTip
 ! tool tip associated with box More...
 

Additional Inherited Members

- Protected Types inherited from TObject
enum  { kOnlyPrepStep = BIT(3) }
 
- Static Protected Member Functions inherited from TQObject
static Int_t CheckConnectArgs (TQObject *sender, TClass *sender_class, const char *signal, TClass *receiver_class, const char *slot)
 Checking of consistency of sender/receiver methods/arguments. More...
 
static TString CompressName (const char *method_name)
 Removes "const" words and blanks from full (with prototype) method name and resolve any typedefs in the method signature. More...
 
static Bool_t ConnectToClass (const char *sender_class, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 This method allows to make connection from any object of the same class to the receiver object. More...
 
static Bool_t ConnectToClass (TQObject *sender, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver. More...
 

#include <TPad.h>

Inheritance diagram for TPad:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kFraming 

Frame is requested.

kHori 

Pad is horizontal.

kClipFrame 

Clip on frame.

kPrintingPS 

PS Printing.

kCannotMove 

Fixed position.

kClearAfterCR 

Clear after CR.

Definition at line 149 of file TPad.h.

Constructor & Destructor Documentation

◆ TPad() [1/3]

TPad::TPad ( const TPad pad)
privatedelete

◆ TPad() [2/3]

TPad::TPad ( )

Pad default constructor.

Definition at line 129 of file TPad.cxx.

◆ TPad() [3/3]

TPad::TPad ( const char *  name,
const char *  title,
Double_t  xlow,
Double_t  ylow,
Double_t  xup,
Double_t  yup,
Color_t  color = -1,
Short_t  bordersize = -1,
Short_t  bordermode = -2 
)

Pad constructor.

A pad is a linked list of primitives. A pad is contained in a canvas. It may contain other pads. A pad has attributes. When a pad is created, the attributes defined in the current style are copied to the pad attributes.

Parameters
[in]namepad name
[in]titlepad title
[in]xlow[0,1] is the position of the bottom left point of the pad expressed in the mother pad reference system
[in]ylow[0,1] is the Y position of this point.
[in]xup[0,1] is the x position of the top right point of the pad expressed in the mother pad reference system
[in]yup[0,1] is the Y position of this point.
[in]colorpad color
[in]bordersizeborder size in pixels
[in]bordermodeborder mode
  • bordermode = -1 box looks as it is behind the screen
  • bordermode = 0 no special effects
  • bordermode = 1 box looks as it is in front of the screen

Definition at line 244 of file TPad.cxx.

◆ ~TPad()

TPad::~TPad ( )
virtual

Pad destructor.

Definition at line 380 of file TPad.cxx.

Member Function Documentation

◆ AbsCoordinates()

void TPad::AbsCoordinates ( Bool_t  set)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 163 of file TPad.h.

◆ AbsPixeltoX()

Double_t TPad::AbsPixeltoX ( Int_t  px)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 164 of file TPad.h.

◆ AbsPixeltoXY()

void TPad::AbsPixeltoXY ( Int_t  xpixel,
Int_t  ypixel,
Double_t x,
Double_t y 
)
inlinevirtual

Definition at line 422 of file TPad.h.

◆ AbsPixeltoY()

Double_t TPad::AbsPixeltoY ( Int_t  py)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 165 of file TPad.h.

◆ AddExec()

void TPad::AddExec ( const char *  name,
const char *  command 
)
overridevirtual

Add a new TExec object to the list of Execs.

When an event occurs in the pad (mouse click, etc) the list of C++ commands in the list of Execs are executed via TPad::AutoExec.

When a pad event occurs (mouse move, click, etc) all the commands contained in the fExecs list are executed in the order found in the list.

This facility is activated by default. It can be deactivated by using the canvas "Option" menu.

The following examples of TExec commands are provided in the tutorials: macros exec1.C and exec2.C.

Example1 of use of exec1.C

Root > TFile f("hsimple.root")
Root > hpx.Draw()
Root > c1.AddExec("ex1",".x exec1.C")
#define f(i)
Definition: RSha256.hxx:104
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
void AddExec(const char *name, const char *command) override
Add a new TExec object to the list of Execs.
Definition: TPad.cxx:446
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
Definition: TPad.cxx:1300
return c1
Definition: legend1.C:41
Double_t x[n]
Definition: legend1.C:17
static double C[]
const char * Root
Definition: TXMLSetup.cxx:47

At this point you can use the mouse to click on the contour of the histogram hpx. When the mouse is clicked, the bin number and its contents are printed.

Example2 of use of exec1.C

Root > TFile f("hsimple.root")
Root > hpxpy.Draw()
Root > c1.AddExec("ex2",".x exec2.C")

When moving the mouse in the canvas, a second canvas shows the projection along X of the bin corresponding to the Y position of the mouse. The resulting histogram is fitted with a gaussian. A "dynamic" line shows the current bin position in Y. This more elaborated example can be used as a starting point to develop more powerful interactive applications exploiting the C++ interpreter as a development engine.

Implements TVirtualPad.

Definition at line 446 of file TPad.cxx.

◆ AutoExec()

void TPad::AutoExec ( )
virtual

Execute the list of Execs when a pad event occurs.

Definition at line 456 of file TPad.cxx.

◆ Browse()

void TPad::Browse ( TBrowser b)
overridevirtual

Browse pad.

Reimplemented from TObject.

Definition at line 471 of file TPad.cxx.

◆ BuildLegend()

TLegend * TPad::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 = "" 
)
overridevirtual

Build a legend from the graphical objects in the pad.

A simple method to build automatically a TLegend from the primitives in a TPad.

Only those deriving from TAttLine, TAttMarker and TAttFill are added, excluding TPave and TFrame derived classes.

Returns
The built TLegend
Parameters
[in]x1,y1,x2,y2The TLegend coordinates
[in]titleThe legend title. By default it is " "
[in]optionThe TLegend option

The caller program owns the returned TLegend.

If the pad contains some TMultiGraph or THStack the individual graphs or histograms in them are added to the TLegend.

Automatic placement of the legend

If x1 is equal to x2 and y1 is equal to y2 the legend will be automatically placed to avoid overlapping with the existing primitives already displayed. x1 is considered as the width of the legend and y1 the height. By default the legend is automatically placed with width = x1= x2 = 0.3 and height = y1= y2 = 0.21.

Implements TVirtualPad.

Definition at line 503 of file TPad.cxx.

◆ cd()

TVirtualPad * TPad::cd ( Int_t  subpadnumber = 0)
overridevirtual

Set Current pad.

When a canvas/pad is divided via TPad::Divide, one can directly set the current path to one of the subdivisions. See TPad::Divide for the convention to number sub-pads.

Returns the new current pad, or 0 in case of failure.

For example:

c1.Divide(2,3); // create 6 pads (2 divisions along x, 3 along y).

To set the current pad to the bottom right pad, do

c1.cd(6);

Note1: c1.cd() is equivalent to c1.cd(0) and sets the current pad to c1 itself.

Note2: after a statement like c1.cd(6), the global variable gPad points to the current pad. One can use gPad to set attributes of the current pad.

Note3: One can get a pointer to one of the sub-pads of pad with: TPad subpad = (TPad)pad->GetPad(subpadnumber);

Implements TVirtualPad.

Definition at line 604 of file TPad.cxx.

◆ Clear()

void TPad::Clear ( Option_t option = "")
overridevirtual

Delete all pad primitives.

If the bit kClearAfterCR has been set for this pad, the Clear function will execute only after having pressed a CarriageReturn Set the bit with mypad->SetBit(TPad::kClearAfterCR)

Implements TVirtualPad.

Definition at line 634 of file TPad.cxx.

◆ Clip() [1/2]

Int_t TPad::Clip ( Double_t x,
Double_t y,
Double_t  xclipl,
Double_t  yclipb,
Double_t  xclipr,
Double_t  yclipt 
)
overridevirtual

Clipping routine: Cohen Sutherland algorithm.

  • If Clip ==2 the segment is outside the boundary.
  • If Clip ==1 the segment has one point outside the boundary.
  • If Clip ==0 the segment is inside the boundary.
Parameters
[in]x[],y[]Segment coordinates (2 points)
[in]xclipl,yclipb,xclipr,ycliptClipping boundary
[out]x[],y[]New segment coordinates(2 points)

Implements TVirtualPad.

Definition at line 755 of file TPad.cxx.

◆ Clip() [2/2]

Int_t TPad::Clip ( Float_t x,
Float_t y,
Float_t  xclipl,
Float_t  yclipb,
Float_t  xclipr,
Float_t  yclipt 
)
virtual

Clipping routine: Cohen Sutherland algorithm.

  • If Clip ==2 the segment is outside the boundary.
  • If Clip ==1 the segment has one point outside the boundary.
  • If Clip ==0 the segment is inside the boundary.
Parameters
[in]x[],y[]Segment coordinates (2 points)
[in]xclipl,yclipb,xclipr,ycliptClipping boundary
[out]x[],y[]New segment coordinates( 2 points)

Definition at line 684 of file TPad.cxx.

◆ ClippingCode()

Int_t TPad::ClippingCode ( Double_t  x,
Double_t  y,
Double_t  xcl1,
Double_t  ycl1,
Double_t  xcl2,
Double_t  ycl2 
)
virtual

Compute the endpoint codes for TPad::Clip.

Definition at line 826 of file TPad.cxx.

◆ ClipPolygon()

Int_t TPad::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 
)
virtual

Clip polygon using the Sutherland-Hodgman algorithm.

Parameters
[in]nNumber of points in the polygon to be clipped
[in]x[n],y[n]Polygon do be clipped vertices
[in]xclipl,yclipb,xclipr,ycliptClipping boundary
[out]nnNumber of points in xc and yc
[out]xc,ycClipped polygon vertices. The Int_t returned by this function is the number of points in the clipped polygon. These vectors must be allocated by the calling function. A size of 2*n for each is enough.

Sutherland and Hodgman's polygon-clipping algorithm uses a divide-and-conquer strategy: It solves a series of simple and identical problems that, when combined, solve the overall problem. The simple problem is to clip a polygon against a single infinite clip edge. Four clip edges, each defining one boundary of the clip rectangle, successively clip a polygon against a clip rectangle.

Steps of Sutherland-Hodgman's polygon-clipping algorithm:

  • Polygons can be clipped against each edge of the window one at a time. Windows/edge intersections, if any, are easy to find since the X or Y coordinates are already known.
  • Vertices which are kept after clipping against one window edge are saved for clipping against the remaining edges.
  • Note that the number of vertices usually changes and will often increases.

The clip boundary determines a visible and invisible region. The edges from vertex i to vertex i+1 can be one of four types:

  • Case 1 : Wholly inside visible region - save endpoint
  • Case 2 : Exit visible region - save the intersection
  • Case 3 : Wholly outside visible region - save nothing
  • Case 4 : Enter visible region - save intersection and endpoint

Definition at line 875 of file TPad.cxx.

◆ Close()

void TPad::Close ( Option_t option = "")
overridevirtual

Delete all primitives in pad and pad itself.

Pad cannot be used anymore after this call. Emits signal "Closed()".

Implements TVirtualPad.

Definition at line 999 of file TPad.cxx.

◆ Closed()

virtual void TPad::Closed ( )
inlinevirtual

Reimplemented in TCanvas.

Definition at line 178 of file TPad.h.

◆ CloseToolTip()

void TPad::CloseToolTip ( TObject tip)
overridevirtual

Hide tool tip.

Implements TVirtualPad.

Definition at line 6966 of file TPad.cxx.

◆ Collide()

Bool_t TPad::Collide ( Int_t  i,
Int_t  j,
Int_t  w,
Int_t  h 
)
private

Check if a box of size w and h collide some primitives in the pad at position i,j.

Definition at line 3102 of file TPad.cxx.

◆ CopyBackgroundPixmap()

void TPad::CopyBackgroundPixmap ( Int_t  x,
Int_t  y 
)
private

Copy pixmap of this pad as background of the current pad.

Definition at line 3863 of file TPad.cxx.

◆ CopyBackgroundPixmaps()

void TPad::CopyBackgroundPixmaps ( TPad start,
TPad stop,
Int_t  x,
Int_t  y 
)
private

Copy pixmaps of pads laying below pad "stop" into pad "stop".

This gives the effect of pad "stop" being transparent.

Definition at line 3845 of file TPad.cxx.

◆ CopyPixmap()

void TPad::CopyPixmap ( )
overridevirtual

Copy the pixmap of the pad to the canvas.

Implements TVirtualPad.

Definition at line 1057 of file TPad.cxx.

◆ CopyPixmaps()

void TPad::CopyPixmaps ( )
overridevirtual

Copy the sub-pixmaps of the pad to the canvas.

Implements TVirtualPad.

Definition at line 1071 of file TPad.cxx.

◆ CreateToolTip()

TObject * TPad::CreateToolTip ( const TBox b,
const char *  text,
Long_t  delayms 
)
overridevirtual

Create a tool tip and return its pointer.

Implements TVirtualPad.

Definition at line 6934 of file TPad.cxx.

◆ DeleteExec()

void TPad::DeleteExec ( const char *  name)
overridevirtual

Remove TExec name from the list of Execs.

Implements TVirtualPad.

Definition at line 1087 of file TPad.cxx.

◆ DeleteToolTip()

void TPad::DeleteToolTip ( TObject tip)
overridevirtual

Delete tool tip object.

Implements TVirtualPad.

Definition at line 6944 of file TPad.cxx.

◆ DestroyExternalViewer3D()

void TPad::DestroyExternalViewer3D ( )
protected

◆ DistancetoPrimitive()

Int_t TPad::DistancetoPrimitive ( Int_t  px,
Int_t  py 
)
overrideprotectedvirtual

Compute distance from point px,py to a box.

Compute the closest distance of approach from point px,py to the edges of this pad. The distance is computed in pixels units.

Reimplemented from TObject.

Definition at line 1103 of file TPad.cxx.

◆ Divide()

void TPad::Divide ( Int_t  nx = 1,
Int_t  ny = 1,
Float_t  xmargin = 0.01,
Float_t  ymargin = 0.01,
Int_t  color = 0 
)
overridevirtual

Automatic pad generation by division.

  • The current canvas is divided in nx by ny equal divisions (pads).
  • xmargin is the space along x between pads in percent of canvas.
  • ymargin is the space along y between pads in percent of canvas.
  • color is the color of the new pads. If 0, color is the canvas color.

Pads are automatically named canvasname_n where n is the division number starting from top left pad.

Example if canvasname=c1 , nx=2, ny=3:

Once a pad is divided into sub-pads, one can set the current pad to a subpad with a given division number as illustrated above with TPad::cd(subpad_number).

For example, to set the current pad to c1_4, one can do:

c1->cd(4)

Note1: c1.cd() is equivalent to c1.cd(0) and sets the current pad to c1 itself.

Note2: after a statement like c1.cd(6), the global variable gPad points to the current pad. One can use gPad to set attributes of the current pad.

Note3: in case xmargin <=0 and ymargin <= 0, there is no space between pads. The current pad margins are recomputed to optimize the layout.

Implements TVirtualPad.

Definition at line 1178 of file TPad.cxx.

◆ DivideSquare()

void TPad::DivideSquare ( Int_t  n,
Float_t  xmargin = 0.01,
Float_t  ymargin = 0.01,
Int_t  color = 0 
)
virtual

"n" is the total number of sub-pads.

The number of sub-pads along the X and Y axis are computed according to the square root of n.

Definition at line 1277 of file TPad.cxx.

◆ Draw()

void TPad::Draw ( Option_t option = "")
overridevirtual

Draw Pad in Current pad (re-parent pad if necessary).

Implements TVirtualPad.

Definition at line 1300 of file TPad.cxx.

◆ DrawClassObject()

void TPad::DrawClassObject ( const TObject classobj,
Option_t option = "" 
)
overridevirtual

Draw class inheritance tree of the class to which obj belongs.

If a class B inherits from a class A, description of B is drawn on the right side of description of A.

Member functions overridden by B are shown in class A with a blue line crossing-out the corresponding member function.

Implements TVirtualPad.

Definition at line 1334 of file TPad.cxx.

◆ DrawCollideGrid()

void TPad::DrawCollideGrid ( )

This method draws the collide grid on top of the canvas.

This is used for debugging only. At some point it will be removed.

Definition at line 3351 of file TPad.cxx.

◆ DrawColorTable()

void TPad::DrawColorTable ( )
static

Static function to Display Color Table in a pad.

Definition at line 1652 of file TPad.cxx.

◆ DrawCrosshair()

void TPad::DrawCrosshair ( )
virtual

Function called to draw a crosshair in the canvas.

Example:

Root > TFile f("hsimple.root");
Root > hpxpy.Draw();
Root > c1.SetCrosshair();

When moving the mouse in the canvas, a crosshair is drawn

  • if the canvas fCrosshair = 1 , the crosshair spans the full canvas
  • if the canvas fCrosshair > 1 , the crosshair spans only the pad

Definition at line 1536 of file TPad.cxx.

◆ DrawDist()

void TPad::DrawDist ( Rectangle_t  aBBox,
Rectangle_t  bBBox,
char  mode 
)
private

Draw Arrows to indicated equal distances of Objects with given BBoxes.

Used by ShowGuidelines

Definition at line 6113 of file TPad.cxx.

◆ DrawFrame()

TH1F * TPad::DrawFrame ( Double_t  xmin,
Double_t  ymin,
Double_t  xmax,
Double_t  ymax,
const char *  title = "" 
)
overridevirtual

Draw an empty pad frame with X and Y axis.

Returns
The pointer to the histogram used to draw the frame.
Parameters
[in]xminX axis lower limit
[in]xmaxX axis upper limit
[in]yminY axis lower limit
[in]ymaxY axis upper limit
[in]titlePad title.If title is of the form "stringt;stringx;stringy" the pad title is set to stringt, the x axis title to stringx, the y axis title to stringy.

Example:

{
auto c = new TCanvas("c","c",200,10,500,300);
const Int_t n = 50;
auto g = new TGraph();
for (Int_t i=0;i<n;i++) g->SetPoint(i,i*0.1,100*sin(i*0.1+0.2));
auto frame = c->DrawFrame(0, -110, 2, 110);
frame->GetXaxis()->SetTitle("X axis");
g->Draw("L*");
}
int Int_t
Definition: CPyCppyy.h:43
#define c(i)
Definition: RSha256.hxx:101
#define g(i)
Definition: RSha256.hxx:105
double sin(double)
The Canvas class.
Definition: TCanvas.h:23
A TGraph is an object made of two arrays X and Y with npoints each.
Definition: TGraph.h:41
const Int_t n
Definition: legend1.C:16

Implements TVirtualPad.

Definition at line 1607 of file TPad.cxx.

◆ EventPave()

virtual void TPad::EventPave ( )
inlinevirtual

Definition at line 406 of file TPad.h.

◆ ExecuteEvent()

void TPad::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
)
overrideprotectedvirtual

Execute action corresponding to one event.

This member function is called when a TPad object is clicked.

If the mouse is clicked in one of the 4 corners of the pad (pA,pB,pC,pD) the pad is resized with the rubber rectangle.

If the mouse is clicked inside the pad, the pad is moved.

If the mouse is clicked on the 4 edges (pL,pR,pTop,pBot), the pad is scaled parallel to this edge.

Note that this function duplicates on purpose the functionality already implemented in TBox::ExecuteEvent. If somebody modifies this function, may be similar changes should also be applied to TBox::ExecuteEvent.

Reimplemented from TObject.

Definition at line 1715 of file TPad.cxx.

◆ ExecuteEventAxis()

void TPad::ExecuteEventAxis ( Int_t  event,
Int_t  px,
Int_t  py,
TAxis axis 
)
overridevirtual

Execute action corresponding to one event for a TAxis object (called by TAxis::ExecuteEvent.) This member function is called when an axis is clicked with the locator.

The axis range is set between the position where the mouse is pressed and the position where it is released.

If the mouse position is outside the current axis range when it is released the axis is unzoomed with the corresponding proportions.

Note that the mouse does not need to be in the pad or even canvas when it is released.

Implements TVirtualPad.

Definition at line 2290 of file TPad.cxx.

◆ FillCollideGrid()

void TPad::FillCollideGrid ( TObject o)
private

Initialise the grid used to find empty space when adding a box (Legend) in a pad.

Definition at line 3039 of file TPad.cxx.

◆ FillCollideGridTBox()

void TPad::FillCollideGridTBox ( TObject o)
private

Definition at line 3195 of file TPad.cxx.

◆ FillCollideGridTFrame()

void TPad::FillCollideGridTFrame ( TObject o)
private

Definition at line 3212 of file TPad.cxx.

◆ FillCollideGridTGraph()

void TPad::FillCollideGridTGraph ( TObject o)
private

Definition at line 3238 of file TPad.cxx.

◆ FillCollideGridTH1()

void TPad::FillCollideGridTH1 ( TObject o)
private

Definition at line 3269 of file TPad.cxx.

◆ FindObject() [1/2]

TObject * TPad::FindObject ( const char *  name) const
overridevirtual

Search if object named name is inside this pad or in pads inside this pad.

In case name is in several sub-pads the first one is returned.

Reimplemented from TObject.

Definition at line 2626 of file TPad.cxx.

◆ FindObject() [2/2]

TObject * TPad::FindObject ( const TObject obj) const
overridevirtual

Search if obj is in pad or in pads inside this pad.

In case obj is in several sub-pads the first one is returned.

Reimplemented from TObject.

Definition at line 2647 of file TPad.cxx.

◆ GetAbsHNDC()

Double_t TPad::GetAbsHNDC ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 217 of file TPad.h.

◆ GetAbsWNDC()

Double_t TPad::GetAbsWNDC ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 216 of file TPad.h.

◆ GetAbsXlowNDC()

Double_t TPad::GetAbsXlowNDC ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 214 of file TPad.h.

◆ GetAbsYlowNDC()

Double_t TPad::GetAbsYlowNDC ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 215 of file TPad.h.

◆ GetAspectRatio()

Double_t TPad::GetAspectRatio ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 218 of file TPad.h.

◆ GetBBox()

Rectangle_t TPad::GetBBox ( )
overridevirtual

Return the bounding Box of the Pad.

Implements TAttBBox2D.

Definition at line 7115 of file TPad.cxx.

◆ GetBBoxCenter()

TPoint TPad::GetBBoxCenter ( )
overridevirtual

Return the center of the Pad as TPoint in pixels.

Implements TAttBBox2D.

Definition at line 7129 of file TPad.cxx.

◆ GetBorderMode()

Short_t TPad::GetBorderMode ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 193 of file TPad.h.

◆ GetBorderSize()

Short_t TPad::GetBorderSize ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 194 of file TPad.h.

◆ GetCanvas()

TCanvas* TPad::GetCanvas ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 256 of file TPad.h.

◆ GetCanvasID()

Int_t TPad::GetCanvasID ( ) const
overridevirtual

Get canvas identifier.

Implements TVirtualPad.

Definition at line 2666 of file TPad.cxx.

◆ GetCanvasImp()

TCanvasImp * TPad::GetCanvasImp ( ) const
overridevirtual

Get canvas implementation pointer if any.

Implements TVirtualPad.

Definition at line 2674 of file TPad.cxx.

◆ GetCrosshair()

Int_t TPad::GetCrosshair ( ) const

Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.

Definition at line 6500 of file TPad.cxx.

◆ GetEvent()

Int_t TPad::GetEvent ( ) const
overridevirtual

Get Event.

Implements TVirtualPad.

Definition at line 2682 of file TPad.cxx.

◆ GetEventX()

Int_t TPad::GetEventX ( ) const
overridevirtual

Get X event.

Implements TVirtualPad.

Definition at line 2690 of file TPad.cxx.

◆ GetEventY()

Int_t TPad::GetEventY ( ) const
overridevirtual

Get Y event.

Implements TVirtualPad.

Definition at line 2698 of file TPad.cxx.

◆ GetFrame()

TFrame * TPad::GetFrame ( )
overridevirtual

Get frame.

Implements TVirtualPad.

Definition at line 2864 of file TPad.cxx.

◆ GetGLDevice()

Int_t TPad::GetGLDevice ( )
overridevirtual

Get GL device.

Implements TVirtualPad.

Definition at line 7082 of file TPad.cxx.

◆ GetGridx()

Bool_t TPad::GetGridx ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 229 of file TPad.h.

◆ GetGridy()

Bool_t TPad::GetGridy ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 230 of file TPad.h.

◆ GetHighLightColor()

Color_t TPad::GetHighLightColor ( ) const
overridevirtual

Get highlight color.

Implements TVirtualPad.

Definition at line 2714 of file TPad.cxx.

◆ GetHNDC()

Double_t TPad::GetHNDC ( ) const
inlineoverridevirtual

Get height of pad along Y in Normalized Coordinates (NDC)

Implements TVirtualPad.

Definition at line 211 of file TPad.h.

◆ GetListOfExecs()

TList* TPad::GetListOfExecs ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 240 of file TPad.h.

◆ GetListOfPrimitives()

TList* TPad::GetListOfPrimitives ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 239 of file TPad.h.

◆ GetLogx()

Int_t TPad::GetLogx ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 250 of file TPad.h.

◆ GetLogy()

Int_t TPad::GetLogy ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 251 of file TPad.h.

◆ GetLogz()

Int_t TPad::GetLogz ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 252 of file TPad.h.

◆ GetMaxPickDistance()

Int_t TPad::GetMaxPickDistance ( )
static

Static function (see also TPad::SetMaxPickDistance)

Definition at line 2722 of file TPad.cxx.

◆ GetMother()

TVirtualPad* TPad::GetMother ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 253 of file TPad.h.

◆ GetName()

const char* TPad::GetName ( ) const
inlineoverridevirtual

Returns name of object.

This default method returns the class name. Classes that give objects a name should override this method.

Implements TVirtualPad.

Definition at line 254 of file TPad.h.

◆ GetNumber()

Int_t TPad::GetNumber ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 231 of file TPad.h.

◆ GetPad()

TVirtualPad * TPad::GetPad ( Int_t  subpadnumber) const
overridevirtual

Get a pointer to subpadnumber of this pad.

Implements TVirtualPad.

Definition at line 2905 of file TPad.cxx.

◆ GetPadPaint()

Int_t TPad::GetPadPaint ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 259 of file TPad.h.

◆ GetPadPar()

void TPad::GetPadPar ( Double_t xlow,
Double_t ylow,
Double_t xup,
Double_t yup 
)
overridevirtual

Return lower and upper bounds of the pad in NDC coordinates.

Implements TVirtualPad.

Definition at line 2926 of file TPad.cxx.

◆ GetPadPointer()

TObject* TPad::GetPadPointer ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 244 of file TPad.h.

◆ GetPadSave()

TVirtualPad * TPad::GetPadSave ( ) const
overridevirtual

Get save pad.

Implements TVirtualPad.

Definition at line 2748 of file TPad.cxx.

◆ GetPainter()

TVirtualPadPainter * TPad::GetPainter ( )
overridevirtual

Get pad painter from TCanvas.

Implements TVirtualPad.

Definition at line 7106 of file TPad.cxx.

◆ GetPhi()

Double_t TPad::GetPhi ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 219 of file TPad.h.

◆ GetPixmapID()

Int_t TPad::GetPixmapID ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 260 of file TPad.h.

◆ GetPrimitive()

TObject * TPad::GetPrimitive ( const char *  name) const
overridevirtual

Get primitive.

Implements TVirtualPad.

Definition at line 2888 of file TPad.cxx.

◆ GetRange()

void TPad::GetRange ( Double_t x1,
Double_t y1,
Double_t x2,
Double_t y2 
)
overridevirtual

Return pad world coordinates range.

Implements TVirtualPad.

Definition at line 2937 of file TPad.cxx.

◆ GetRangeAxis()

void TPad::GetRangeAxis ( Double_t xmin,
Double_t ymin,
Double_t xmax,
Double_t ymax 
)
overridevirtual

Return pad axis coordinates range.

Implements TVirtualPad.

Definition at line 2948 of file TPad.cxx.

◆ GetSelected()

TObject * TPad::GetSelected ( ) const
overridevirtual

Get selected.

Implements TVirtualPad.

Definition at line 2730 of file TPad.cxx.

◆ GetSelectedPad()

TVirtualPad * TPad::GetSelectedPad ( ) const
overridevirtual

Get selected pad.

Implements TVirtualPad.

Definition at line 2739 of file TPad.cxx.

◆ GetTheta()

Double_t TPad::GetTheta ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 220 of file TPad.h.

◆ GetTickx()

Int_t TPad::GetTickx ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 232 of file TPad.h.

◆ GetTicky()

Int_t TPad::GetTicky ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 233 of file TPad.h.

◆ GetTitle()

const char* TPad::GetTitle ( ) const
inlineoverridevirtual

Returns title of object.

This default method returns the class title (i.e. description). Classes that give objects a title should override this method.

Implements TVirtualPad.

Definition at line 255 of file TPad.h.

◆ GetUxmax()

Double_t TPad::GetUxmax ( ) const
inlineoverridevirtual

Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decades.

Implements TVirtualPad.

Definition at line 226 of file TPad.h.

◆ GetUxmin()

Double_t TPad::GetUxmin ( ) const
inlineoverridevirtual

Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decades.

Implements TVirtualPad.

Definition at line 222 of file TPad.h.

◆ GetUymax()

Double_t TPad::GetUymax ( ) const
inlineoverridevirtual

Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decades.

Implements TVirtualPad.

Definition at line 228 of file TPad.h.

◆ GetUymin()

Double_t TPad::GetUymin ( ) const
inlineoverridevirtual

Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decades.

Implements TVirtualPad.

Definition at line 224 of file TPad.h.

◆ GetView()

TView* TPad::GetView ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 248 of file TPad.h.

◆ GetView3D()

TObject* TPad::GetView3D ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 249 of file TPad.h.

◆ GetViewer3D()

TVirtualViewer3D * TPad::GetViewer3D ( Option_t type = "")
overridevirtual

Create/obtain handle to 3D viewer.

Valid types are:

  • 'pad' - pad drawing via TViewer3DPad any others registered with plugin manager supporting TVirtualViewer3D If an invalid/null type is requested then the current viewer is returned (if any), otherwise a default 'pad' type is returned

Implements TVirtualPad.

Reimplemented in TEvePad.

Definition at line 6994 of file TPad.cxx.

◆ GetVirtCanvas()

TVirtualPad * TPad::GetVirtCanvas ( ) const
overridevirtual

Get virtual canvas.

Implements TVirtualPad.

Definition at line 2706 of file TPad.cxx.

◆ GetWh()

UInt_t TPad::GetWh ( ) const
overridevirtual

Get Wh.

Implements TVirtualPad.

Definition at line 2757 of file TPad.cxx.

◆ GetWNDC()

Double_t TPad::GetWNDC ( ) const
inlineoverridevirtual

Get width of pad along X in Normalized Coordinates (NDC)

Implements TVirtualPad.

Definition at line 209 of file TPad.h.

◆ GetWw()

UInt_t TPad::GetWw ( ) const
overridevirtual

Get Ww.

Implements TVirtualPad.

Definition at line 2765 of file TPad.cxx.

◆ GetX1()

Double_t TPad::GetX1 ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 234 of file TPad.h.

◆ GetX2()

Double_t TPad::GetX2 ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 235 of file TPad.h.

◆ GetXlowNDC()

Double_t TPad::GetXlowNDC ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 206 of file TPad.h.

◆ GetY1()

Double_t TPad::GetY1 ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 236 of file TPad.h.

◆ GetY2()

Double_t TPad::GetY2 ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 237 of file TPad.h.

◆ GetYlowNDC()

Double_t TPad::GetYlowNDC ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 207 of file TPad.h.

◆ HasCrosshair()

Bool_t TPad::HasCrosshair ( ) const
overridevirtual

Return kTRUE if the crosshair has been activated (via SetCrosshair).

Implements TVirtualPad.

Definition at line 6491 of file TPad.cxx.

◆ HasFixedAspectRatio()

Bool_t TPad::HasFixedAspectRatio ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 264 of file TPad.h.

◆ Hash()

ULong_t TPad::Hash ( ) const
inlineoverridevirtual

Return hash value for this object.

Note: If this routine is overloaded in a derived class, this derived class should also add

void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
Definition: TROOT.h:393

Otherwise, when RecursiveRemove is called (by ~TObject or example) for this type of object, the transversal of THashList and THashTable containers will will have to be done without call Hash (and hence be linear rather than logarithmic complexity). You will also see warnings like

Error in <ROOT::Internal::TCheckHashRecursiveRemoveConsistency::CheckRecursiveRemove>: The class SomeName overrides TObject::Hash but does not call TROOT::RecursiveRemove in its destructor.
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:893
ULong_t Hash() const override
Return hash value for this object.
Definition: TPad.h:261
void RecursiveRemove(TObject *obj)
Recursively remove this object from the list of Cleanups.
Definition: TROOT.cxx:2448

Reimplemented from TObject.

Definition at line 261 of file TPad.h.

◆ HasViewer3D()

Bool_t TPad::HasViewer3D ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 391 of file TPad.h.

◆ HideToolTip()

void TPad::HideToolTip ( Int_t  event)
protectedvirtual

Hide tool tip depending on the event type.

Typically tool tips are hidden when event is not a kMouseEnter and not a kMouseMotion event.

Definition at line 2775 of file TPad.cxx.

◆ HighLight()

void TPad::HighLight ( Color_t  color = kRed,
Bool_t  set = kTRUE 
)
overridevirtual

Highlight pad.

do not highlight when printing on Postscript

Implements TVirtualPad.

Definition at line 2960 of file TPad.cxx.

◆ IncrementPaletteColor()

Int_t TPad::IncrementPaletteColor ( Int_t  i,
TString  opt 
)
overridevirtual

Increment (i==1) or set (i>1) the number of autocolor in the pad.

Implements TVirtualPad.

Definition at line 3009 of file TPad.cxx.

◆ IsBatch()

Bool_t TPad::IsBatch ( ) const
overridevirtual

Is pad in batch mode ?

Implements TVirtualPad.

Reimplemented in TEvePad.

Definition at line 2784 of file TPad.cxx.

◆ IsEditable()

virtual Bool_t TPad::IsEditable ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 266 of file TPad.h.

◆ IsFolder()

Bool_t TPad::IsFolder ( ) const
inlineoverridevirtual

Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).

Reimplemented from TObject.

Definition at line 267 of file TPad.h.

◆ IsModified()

Bool_t TPad::IsModified ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 268 of file TPad.h.

◆ IsRetained()

Bool_t TPad::IsRetained ( ) const
overridevirtual

Is pad retained ?

Implements TVirtualPad.

Definition at line 2792 of file TPad.cxx.

◆ IsVertical()

Bool_t TPad::IsVertical ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 270 of file TPad.h.

◆ LineNotFree()

void TPad::LineNotFree ( Int_t  x1,
Int_t  x2,
Int_t  y1,
Int_t  y2 
)
private

Mark as "not free" the cells along a line.

Definition at line 3152 of file TPad.cxx.

◆ ls()

void TPad::ls ( Option_t option = "") const
overridevirtual

List all primitives in pad.

Implements TVirtualPad.

Definition at line 2995 of file TPad.cxx.

◆ Modified()

void TPad::Modified ( Bool_t  flag = 1)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 414 of file TPad.h.

◆ NextPaletteColor()

Int_t TPad::NextPaletteColor ( )
overridevirtual

Get the next autocolor in the pad.

Implements TVirtualPad.

Definition at line 3023 of file TPad.cxx.

◆ OpaqueMoving()

Bool_t TPad::OpaqueMoving ( ) const
overridevirtual

Is pad moving in opaque mode ?

Implements TVirtualPad.

Definition at line 2800 of file TPad.cxx.

◆ OpaqueResizing()

Bool_t TPad::OpaqueResizing ( ) const
overridevirtual

Is pad resizing in opaque mode ?

Implements TVirtualPad.

Definition at line 2808 of file TPad.cxx.

◆ operator=()

TPad& TPad::operator= ( const TPad rhs)
privatedelete

◆ PadtoX()

Double_t TPad::PadtoX ( Double_t  x) const
overridevirtual

Convert x from pad to X.

Implements TVirtualPad.

Definition at line 3405 of file TPad.cxx.

◆ PadtoY()

Double_t TPad::PadtoY ( Double_t  y) const
overridevirtual

Convert y from pad to Y.

Implements TVirtualPad.

Definition at line 3414 of file TPad.cxx.

◆ Paint()

void TPad::Paint ( Option_t option = "")
overridevirtual

Paint all primitives in pad.

Implements TVirtualPad.

Reimplemented in TSlider.

Definition at line 3447 of file TPad.cxx.

◆ PaintBorder()

void TPad::PaintBorder ( Color_t  color,
Bool_t  tops 
)
protected

Paint the pad border.

Draw first a box as a normal filled box

Definition at line 3509 of file TPad.cxx.

◆ PaintBorderPS()

void TPad::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 
)
overrideprotectedvirtual

Paint a frame border with Postscript.

Implements TVirtualPad.

Definition at line 3605 of file TPad.cxx.

◆ PaintBox()

void TPad::PaintBox ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2,
Option_t option = "" 
)
overridevirtual

Paint box in CurrentPad World coordinates.

  • if option[0] = 's' the box is forced to be paint with style=0
  • if option[0] = 'l' the box contour is drawn

Implements TVirtualPad.

Definition at line 3751 of file TPad.cxx.

◆ PaintDate()

void TPad::PaintDate ( )
protected

Paint the current date and time if the option date is on.

Definition at line 3614 of file TPad.cxx.

◆ PaintFillArea() [1/2]

void TPad::PaintFillArea ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
overridevirtual

Paint fill area in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3880 of file TPad.cxx.

◆ PaintFillArea() [2/2]

void TPad::PaintFillArea ( Int_t  n,
Float_t x,
Float_t y,
Option_t option = "" 
)
overridevirtual

Implements TVirtualPad.

Definition at line 3872 of file TPad.cxx.

◆ PaintFillAreaHatches()

void TPad::PaintFillAreaHatches ( Int_t  nn,
Double_t xx,
Double_t yy,
Int_t  FillStyle 
)

This function paints hatched fill area according to the FillStyle value The convention for the Hatch is the following:

`FillStyle = 3ijk`
  • i (1-9) : specify the space between each hatch 1 = minimum 9 = maximum the final spacing is i*GetHatchesSpacing(). The hatches spacing is set by SetHatchesSpacing()
  • j (0-9) : specify angle between 0 and 90 degrees
    • 0 = 0
    • 1 = 10
    • 2 = 20
    • 3 = 30
    • 4 = 45
    • 5 = Not drawn
    • 6 = 60
    • 7 = 70
    • 8 = 80
    • 9 = 90
  • k (0-9) : specify angle between 90 and 180 degrees
    • 0 = 180
    • 1 = 170
    • 2 = 160
    • 3 = 150
    • 4 = 135
    • 5 = Not drawn
    • 6 = 120
    • 7 = 110
    • 8 = 100
    • 9 = 90

Definition at line 3966 of file TPad.cxx.

◆ PaintFillAreaNDC()

void TPad::PaintFillAreaNDC ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
overridevirtual

Paint fill area in CurrentPad NDC coordinates.

Implements TVirtualPad.

Definition at line 3920 of file TPad.cxx.

◆ PaintHatches()

void TPad::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 coordinates in the surface defined by n,xx,yy.

Definition at line 4028 of file TPad.cxx.

◆ PaintLine()

void TPad::PaintLine ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2 
)
overridevirtual

Paint line in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 4180 of file TPad.cxx.

◆ PaintLine3D() [1/2]

void TPad::PaintLine3D ( Double_t p1,
Double_t p2 
)
overridevirtual

Paint 3-D line in the CurrentPad.

Implements TVirtualPad.

Definition at line 4243 of file TPad.cxx.

◆ PaintLine3D() [2/2]

void TPad::PaintLine3D ( Float_t p1,
Float_t p2 
)
overridevirtual

Paint 3-D line in the CurrentPad.

Implements TVirtualPad.

Definition at line 4225 of file TPad.cxx.

◆ PaintLineNDC()

void TPad::PaintLineNDC ( Double_t  u1,
Double_t  v1,
Double_t  u2,
Double_t  v2 
)
overridevirtual

Paint line in normalized coordinates.

Implements TVirtualPad.

Definition at line 4205 of file TPad.cxx.

◆ PaintModified()

void TPad::PaintModified ( )
overridevirtual

Traverse pad hierarchy and (re)paint only modified pads.

Implements TVirtualPad.

Definition at line 3664 of file TPad.cxx.

◆ PaintPadFrame()

void TPad::PaintPadFrame ( Double_t  xmin,
Double_t  ymin,
Double_t  xmax,
Double_t  ymax 
)
overridevirtual

Paint histogram/graph frame.

Implements TVirtualPad.

Definition at line 3645 of file TPad.cxx.

◆ PaintPolyLine() [1/2]

void TPad::PaintPolyLine ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
overridevirtual

Paint polyline in CurrentPad World coordinates.

If option[0] == 'C' no clipping

Implements TVirtualPad.

Definition at line 4308 of file TPad.cxx.

◆ PaintPolyLine() [2/2]

void TPad::PaintPolyLine ( Int_t  n,
Float_t x,
Float_t y,
Option_t option = "" 
)
overridevirtual

Paint polyline in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 4261 of file TPad.cxx.

◆ PaintPolyLine3D()

void TPad::PaintPolyLine3D ( Int_t  n,
Double_t p 
)
overridevirtual

Paint 3-D polyline in the CurrentPad.

Implements TVirtualPad.

Definition at line 4383 of file TPad.cxx.

◆ PaintPolyLineNDC()

void TPad::PaintPolyLineNDC ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
overridevirtual

Paint polyline in CurrentPad NDC coordinates.

Implements TVirtualPad.

Definition at line 4359 of file TPad.cxx.

◆ PaintPolyMarker() [1/2]

void TPad::PaintPolyMarker ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
overridevirtual

Paint polymarker in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 4428 of file TPad.cxx.

◆ PaintPolyMarker() [2/2]

void TPad::PaintPolyMarker ( Int_t  n,
Float_t x,
Float_t y,
Option_t option = "" 
)
overridevirtual

Paint polymarker in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 4397 of file TPad.cxx.

◆ PaintText() [1/2]

void TPad::PaintText ( Double_t  x,
Double_t  y,
const char *  text 
)
overridevirtual

Paint text in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 4459 of file TPad.cxx.

◆ PaintText() [2/2]

void TPad::PaintText ( Double_t  x,
Double_t  y,
const wchar_t *  text 
)
overridevirtual

Paint text in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 4472 of file TPad.cxx.

◆ PaintTextNDC() [1/2]

void TPad::PaintTextNDC ( Double_t  u,
Double_t  v,
const char *  text 
)
overridevirtual

Paint text in CurrentPad NDC coordinates.

Implements TVirtualPad.

Definition at line 4485 of file TPad.cxx.

◆ PaintTextNDC() [2/2]

void TPad::PaintTextNDC ( Double_t  u,
Double_t  v,
const wchar_t *  text 
)
overridevirtual

Paint text in CurrentPad NDC coordinates.

Implements TVirtualPad.

Definition at line 4502 of file TPad.cxx.

◆ Pick()

TPad * TPad::Pick ( Int_t  px,
Int_t  py,
TObjLink *&  pickobj 
)
virtual

Search for an object at pixel position px,py.

Check if point is in this pad.

If yes, check if it is in one of the sub-pads

If found in the pad, compute closest distance of approach to each primitive.

If one distance of approach is found to be within the limit Distancemaximum the corresponding primitive is selected and the routine returns.

Reimplemented in TCanvas.

Definition at line 4529 of file TPad.cxx.

◆ PixeltoX()

Double_t TPad::PixeltoX ( Int_t  px)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 430 of file TPad.h.

◆ PixeltoXY()

void TPad::PixeltoXY ( Int_t  xpixel,
Int_t  ypixel,
Double_t x,
Double_t y 
)
inlinevirtual

Definition at line 446 of file TPad.h.

◆ PixeltoY()

Double_t TPad::PixeltoY ( Int_t  py)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 438 of file TPad.h.

◆ PlaceBox()

Bool_t TPad::PlaceBox ( TObject o,
Double_t  w,
Double_t  h,
Double_t xl,
Double_t yb 
)
overridevirtual

Place a box in NDC space.

Returns
true if the box could be placed, false if not.
Parameters
[in]opointer to the box to be placed
[in]wbox width to be placed
[in]hbox height to be placed
[out]xlx position of the bottom left corner of the placed box
[out]yby position of the bottom left corner of the placed box

Implements TVirtualPad.

Definition at line 3123 of file TPad.cxx.

◆ Pop()

void TPad::Pop ( )
overridevirtual

Pop pad to the top of the stack.

Implements TVirtualPad.

Definition at line 4648 of file TPad.cxx.

◆ Print() [1/2]

void TPad::Print ( const char *  filenam,
Option_t option 
)
overridevirtual

Save Canvas contents in a file in one of various formats.

option can be:

  • 0 as "ps"
  • "ps" Postscript file is produced (see special cases below)
  • "Portrait" Postscript file is produced (Portrait)
  • "Landscape" Postscript file is produced (Landscape)
  • "Title:" The character string after "Title:" becomes a table of content entry (for PDF files).
  • "eps" an Encapsulated Postscript file is produced
  • "Preview" an Encapsulated Postscript file with preview is produced.
  • "EmbedFonts" a PDF file with embedded fonts is generated.
  • "pdf" a PDF file is produced NOTE: TMathText will be converted to TLatex; q.e.d., symbols only available in TMathText will not render properly.
  • "svg" a SVG file is produced
  • "tex" a TeX file is produced
  • "gif" a GIF file is produced
  • "gif+NN" an animated GIF file is produced, where NN is delay in 10ms units NOTE: See other variants for looping animation in TASImage::WriteImage
  • "xpm" a XPM file is produced
  • "png" a PNG file is produced
  • "jpg" a JPEG file is produced. NOTE: JPEG's lossy compression will make all sharp edges fuzzy.
  • "tiff" a TIFF file is produced
  • "cxx" a C++ macro file is produced
  • "xml" a XML file
  • "json" a JSON file
  • "root" a ROOT binary file

    filename = 0 - filename is defined by the GetName and its extension is defined with the option

When Postscript output is selected (ps, eps), the canvas is saved to filename.ps or filename.eps. The aspect ratio of the canvas is preserved on the Postscript file. When the "ps" option is selected, the Postscript page will be landscape format if the canvas is in landscape format, otherwise portrait format is selected.

The physical size of the Postscript page is the one selected in the current style. This size can be modified via TStyle::SetPaperSize.

Examples:

R__EXTERN TStyle * gStyle
Definition: TStyle.h:412
void SetPaperSize(EPaperSize size)
Set paper size for PostScript output.
Definition: TStyle.cxx:1654
@ kA4
Definition: TStyle.h:142
@ kUSLetter
Definition: TStyle.h:142

where TStyle::kA4 and TStyle::kUSLetter are defined in the enum EPaperSize in TStyle.h

An alternative is to call:

gStyle->SetPaperSize(20,26); same as kA4
or gStyle->SetPaperSize(20,24); same as kUSLetter
TString as(SEXP s)
Definition: RExports.h:71

The above numbers take into account some margins and are in centimeters.

The "Preview" option

The "Preview" option allows to generate a preview (in the TIFF format) within the Encapsulated Postscript file. This preview can be used by programs like MSWord to visualize the picture on screen. The "Preview" option relies on the "epstool" command (http://www.cs.wisc.edu/~ghost/gsview/epstool.htm).

Example:

canvas->Print("example.eps","Preview");

The "EmbedFonts" option

The "EmbedFonts" option allows to embed the fonts used in a PDF file inside that file. This option relies on the "gs" command (https://ghostscript.com).

Example:

canvas->Print("example.pdf","EmbedFonts");

Writing several canvases to the same Postscript or PDF file:

  • if the Postscript or PDF file name finishes with "(", the file is not closed
  • if the Postscript or PDF file name finishes with ")" and the file has been opened with "(", the file is closed.

Example:

{
TCanvas c1("c1");
h1.Draw();
c1.Print("c1.ps("); //write canvas and keep the ps file open
h2.Draw();
c1.Print("c1.ps"); canvas is added to "c1.ps"
h3.Draw();
c1.Print("c1.ps)"); canvas is added to "c1.ps" and ps file is closed
}
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:3073
TH1F * h1
Definition: legend1.C:5
static constexpr double ps
Definition: file.py:1

In the previous example replacing "ps" by "pdf" will create a multi-pages PDF file.

Note that the following sequence writes the canvas to "c1.ps" and closes the ps file.:

TCanvas c1("c1");
h1.Draw();
c1.Print("c1.ps");

The TCanvas::Print("file.ps(") mechanism is very useful, but it can be a little inconvenient to have the action of opening/closing a file being atomic with printing a page. Particularly if pages are being generated in some loop one needs to detect the special cases of first and last page and then munge the argument to Print() accordingly.

The "[" and "]" can be used instead of "(" and ")".

Example:

c1.Print("file.ps["); // No actual print, just open file.ps
for (int i=0; i<10; ++i) {
// fill canvas for context i
// ...
c1.Print("file.ps"); // actually print canvas to file
}// end loop
c1.Print("file.ps]"); // No actual print, just close.

As before, the same macro is valid for PDF files.

It is possible to print a canvas into an animated GIF file by specifying the file name as "myfile.gif+" or "myfile.gif+NN", where NN*10ms is delay between the subimages' display. If NN is omitted the delay between subimages is zero. Each picture is added in the animation thanks to a loop similar to the following one:

for (int i=0; i<10; ++i) {
// fill canvas for context i
// ...
c1.Print("file.gif+5"); // print canvas to GIF file with 50ms delays
}// end loop

The delay between each frame must be specified in each Print() statement. If the file "myfile.gif" already exists, the new frame are appended at the end of the file. To avoid this, delete it first with gSystem->Unlink(myfile.gif); If you want the gif file to repeat or loop forever, check TASImage::WriteImage documentation

Implements TVirtualPad.

Definition at line 4856 of file TPad.cxx.

◆ Print() [2/2]

void TPad::Print ( const char *  filename = "") const
overridevirtual

Save Pad contents in a file in one of various formats.

  • if filename is "", the file produced is padname.ps
  • if filename starts with a dot, the padname is added in front
  • if filename contains .eps, an Encapsulated Postscript file is produced
  • if filename contains .pdf, a PDF file is produced NOTE: TMathText will be converted to TLatex; q.e.d., symbols only available in TMathText will not render properly.
  • if filename contains .svg, a SVG file is produced
  • if filename contains .tex, a TeX file is produced
  • if filename contains .gif, a GIF file is produced
  • if filename contains .gif+NN, an animated GIF file is produced See comments in TASImage::WriteImage for meaning of NN and other .gif sufix variants
  • if filename contains .xpm, a XPM file is produced
  • if filename contains .png, a PNG file is produced
  • if filename contains .jpg, a JPEG file is produced NOTE: JPEG's lossy compression will make all sharp edges fuzzy.
  • if filename contains .tiff, a TIFF file is produced
  • if filename contains .C or .cxx, a C++ macro file is produced
  • if filename contains .root, a Root file is produced
  • if filename contains .xml, a XML file is produced
  • if filename contains .json, a JSON file is produced

See comments in TPad::SaveAs or the TPad::Print function below

Implements TVirtualPad.

Definition at line 4689 of file TPad.cxx.

◆ Range()

void TPad::Range ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2 
)
overridevirtual

Set world coordinate system for the pad.

Emits signal "RangeChanged()", in the slot get the range via GetRange().

Implements TVirtualPad.

Definition at line 5197 of file TPad.cxx.

◆ RangeAxis()

void TPad::RangeAxis ( Double_t  xmin,
Double_t  ymin,
Double_t  xmax,
Double_t  ymax 
)
overridevirtual

Set axis coordinate system for the pad.

The axis coordinate system is a subset of the world coordinate system xmin,ymin is the origin of the current coordinate system, xmax is the end of the X axis, ymax is the end of the Y axis. By default a margin of 10 per cent is left on all sides of the pad Emits signal "RangeAxisChanged()", in the slot get the axis range via GetRangeAxis().

Implements TVirtualPad.

Definition at line 5235 of file TPad.cxx.

◆ RangeAxisChanged()

virtual void TPad::RangeAxisChanged ( )
inlinevirtual

Definition at line 310 of file TPad.h.

◆ RangeChanged()

virtual void TPad::RangeChanged ( )
inlinevirtual

Definition at line 308 of file TPad.h.

◆ RecordLatex()

void TPad::RecordLatex ( const TObject obj)
virtual

Emit RecordLatex() signal.

Definition at line 7098 of file TPad.cxx.

◆ RecordPave()

void TPad::RecordPave ( const TObject obj)
virtual

Emit RecordPave() signal.

Definition at line 7090 of file TPad.cxx.

◆ RecursiveRemove()

void TPad::RecursiveRemove ( TObject obj)
overridevirtual

Recursively remove object from a pad and its sub-pads.

Implements TVirtualPad.

Definition at line 5255 of file TPad.cxx.

◆ RedrawAxis()

void TPad::RedrawAxis ( Option_t option = "")
overridevirtual

Redraw the frame axis.

Redrawing axis may be necessary in case of superimposed histograms when one or more histograms have a fill color.

Instead of calling this function, it may be more convenient to call directly h1->Draw("sameaxis") where h1 is the pointer to the first histogram drawn in the pad.

By default, if the pad has the options gridx or/and gridy activated, the grid is not drawn by this function.

If option="g" is specified, this will force the drawing of the grid on top of the picture

To redraw the axis tick marks do:

gPad->RedrawAxis();
#define gPad
Definition: TVirtualPad.h:287

To redraw the axis grid do:

gPad->RedrawAxis("G");

To redraw the axis tick marks and the axis grid do:

gPad->RedrawAxis();
gPad->RedrawAxis("G");

If option="f" is specified, this will force the drawing of the frame around the plot.

Implements TVirtualPad.

Definition at line 5301 of file TPad.cxx.

◆ ReleaseViewer3D()

void TPad::ReleaseViewer3D ( Option_t type = "")
overridevirtual

Release current (external) viewer.

Implements TVirtualPad.

Definition at line 7066 of file TPad.cxx.

◆ ResetToolTip()

void TPad::ResetToolTip ( TObject tip)
overridevirtual

Reset tool tip, i.e.

within time specified in CreateToolTip the tool tip will pop up.

Implements TVirtualPad.

Definition at line 6955 of file TPad.cxx.

◆ ResetView3D()

void TPad::ResetView3D ( TObject view = nullptr)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 313 of file TPad.h.

◆ Resized()

virtual void TPad::Resized ( )
inlinevirtual

Definition at line 315 of file TPad.h.

◆ ResizePad()

void TPad::ResizePad ( Option_t option = "")
overridevirtual

Compute pad conversion coefficients.

Conversion from x to px

\[\frac{x-xmin}{xrange} = \frac{px-pxlow}{pxrange}\]

with:

\[ xrange = xmax-xmin \]

\[ pxrange = pxmax-pxmin \]

\[ \Rightarrow px = \frac{pxrange(x-xmin)}{xrange} + pxlow = fXtoPixelk + fXtoPixel \times x \]

\[ \Rightarrow fXtoPixelk = pxlow - pxrange \frac{xmin}{xrange} \]

\[ fXtoPixel = \frac{pxrange}{xrange} \]

where:

\[ pxlow = fAbsXlowNDC \times fCw \]

\[ pxrange = fAbsWNDC \times fCw \]

Conversion from y to py

\[\frac{y-ymin}{yrange} = \frac{py-pylow}{pyrange}\]

with:

\[ yrange = ymax-ymin \]

\[ pyrange = pymax-pymin \]

\[ \Rightarrow py = \frac{pyrange(y-xmin)}{yrange} + pylow = fYtoPixelk + fYtoPixel \times y \]

\[ \Rightarrow fYtoPixelk = pylow - pyrange \frac{ymin}{yrange} \]

\[ fYtoPixel = \frac{pyrange}{yrange} \]

where:

\[ pylow = fAbsYlowNDC \times fCh \]

\[ pyrange = fAbsHNDC \times fCh \]

Conversion from px to x

\[ \Rightarrow x = \frac{xrange(px-pxlow)}{pxrange}+ xmin = fPixeltoXk + fPixeltoX \times px \]

\[ \Rightarrow fPixeltoXk = xmin - pxlow \times\frac{xrange}{pxrange} \]

\[ fPixeltoX = \frac{xrange}{pxrange} \]

Conversion from py to y

\[ \Rightarrow y = \frac{yrange(py-pylow)}{pyrange}+ ymin = fPixeltoYk + fPixeltoY \times py \]

\[ \Rightarrow fPixeltoYk = ymin - pylow \times\frac{yrange}{pyrange} \]

\[ fPixeltoY = \frac{yrange}{pyrange} \]

Computation of the coefficients in case of LOG scales

Conversion from pixel coordinates to world coordinates

\[ u = \frac{Log(x) - Log(xmin)}{Log(xmax) - Log(xmin)} = \frac{Log(x/xmin)}{Log(xmax/xmin)} = \frac{px - pxlow}{pxrange} \]

\[ \Rightarrow Log(\frac{x}{xmin}) = u \times Log(\frac{xmax}{xmin}) \]

\[ x = xmin \times e^{(u \times Log(\frac{xmax}{xmin})} \]

Let:

\[ alfa = \frac{Log(\frac{xmax}{xmin})}{fAbsWNDC} \]

\[ x = xmin \times e^{(-alfa \times pxlow)} + e^{(alfa \times px)} \]

\[ x = fPixeltoXk \times e^{(fPixeltoX \times px)} \]

\[ ==> fPixeltoXk = xmin \times e^{(-alfa*pxlow)} \]

\[ fPixeltoX = alfa \]

\[ v = \frac{Log(y) - Log(ymin)}{Log(ymax) - Log(ymin)} = \frac{Log(y/ymin)}{Log(ymax/ymin)} = \frac{py - pylow}{pyrange} \]

Let:

\[ beta = Log(\frac{ymax}{ymin}) \]

\[ Log(\frac{y}{ymin}) = beta \times pylow - beta \times py \]

\[ \frac{y}{ymin} = e^{(beta \times pylow - beta \times py)} \]

\[ y = ymin \times e^{(beta \times pylow)} \times e^{(-beta \times py)}\]

\[ \Rightarrow y = fPixeltoYk \times e^{(fPixeltoY \times py)} \]

\[ fPixeltoYk = ymin \times e^{(beta \times pylow)} \]

\[ fPixeltoY = -beta \]

Conversion from World coordinates to pixel coordinates

\[ px = pxlow + u*pxrange \]

\[ = pxlow + Log(x/xmin)/alfa \]

\[ = pxlow -Log(xmin)/alfa + Log(x)/alfa \]

\[ = fXtoPixelk + fXtoPixel*Log(x) \]

\[ \Rightarrow fXtoPixelk = pxlow -Log(xmin)/alfa \]

\[ \Rightarrow fXtoPixel = 1/alfa \]

\[ py = pylow - Log(y/ymin)/beta \]

\[ = fYtoPixelk + fYtoPixel*Log(y) \]

\[ \Rightarrow fYtoPixelk = pylow - Log(ymin)/beta \]

\[ fYtoPixel = 1/beta \]

Implements TVirtualPad.

Definition at line 5478 of file TPad.cxx.

◆ SaveAs()

void TPad::SaveAs ( const char *  filename = "",
Option_t option = "" 
) const
overridevirtual

Save Pad contents in a file in one of various formats.

  • if filename is "", the file produced is padname.ps
  • if filename starts with a dot, the padname is added in front
  • if filename contains .eps, an Encapsulated Postscript file is produced
  • if filename contains .pdf, a PDF file is produced NOTE: TMathText will be converted to TLatex; q.e.d., symbols only available in TMathText will not render properly.
  • if filename contains .svg, a SVG file is produced
  • if filename contains .tex, a TeX file is produced
  • if filename contains .gif, a GIF file is produced
  • if filename contains .gif+NN, an animated GIF file is produced See comments in TASImage::WriteImage for meaning of NN and other .gif sufix variants
  • if filename contains .xpm, a XPM file is produced
  • if filename contains .png, a PNG file is produced
  • if filename contains .jpg, a JPEG file is produced NOTE: JPEG's lossy compression will make all sharp edges fuzzy.
  • if filename contains .tiff, a TIFF file is produced
  • if filename contains .C or .cxx, a C++ macro file is produced
  • if filename contains .root, a Root file is produced
  • if filename contains .xml, a XML file is produced
  • if filename contains .json, a JSON file is produced

    See comments in TPad::Print for the Postscript formats

Implements TVirtualPad.

Definition at line 5632 of file TPad.cxx.

◆ SavePrimitive()

void TPad::SavePrimitive ( std::ostream &  out,
Option_t option = "" 
)
overrideprotectedvirtual

Save primitives in this pad on the C++ source file out.

Reimplemented from TObject.

Reimplemented in TSlider.

Definition at line 5695 of file TPad.cxx.

◆ SetAttFillPS()

void TPad::SetAttFillPS ( Color_t  color,
Style_t  style 
)
overridevirtual

Set postscript fill area attributes.

Implements TVirtualPad.

Definition at line 6051 of file TPad.cxx.

◆ SetAttLinePS()

void TPad::SetAttLinePS ( Color_t  color,
Style_t  style,
Width_t  lwidth 
)
overridevirtual

Set postscript line attributes.

Implements TVirtualPad.

Definition at line 6062 of file TPad.cxx.

◆ SetAttMarkerPS()

void TPad::SetAttMarkerPS ( Color_t  color,
Style_t  style,
Size_t  msize 
)
overridevirtual

Set postscript marker attributes.

Implements TVirtualPad.

Definition at line 6074 of file TPad.cxx.

◆ SetAttTextPS()

void TPad::SetAttTextPS ( Int_t  align,
Float_t  angle,
Color_t  color,
Style_t  font,
Float_t  tsize 
)
overridevirtual

Set postscript text attributes.

Implements TVirtualPad.

Definition at line 6086 of file TPad.cxx.

◆ SetBatch()

void TPad::SetBatch ( Bool_t  batch = kTRUE)
overrideprotectedvirtual

Set pad in batch mode.

Implements TVirtualPad.

Definition at line 2816 of file TPad.cxx.

◆ SetBBoxCenter()

void TPad::SetBBoxCenter ( const TPoint p)
overridevirtual

Set center of the Pad.

Implements TAttBBox2D.

Definition at line 7143 of file TPad.cxx.

◆ SetBBoxCenterX()

void TPad::SetBBoxCenterX ( const Int_t  x)
overridevirtual

Set X coordinate of the center of the Pad.

Implements TAttBBox2D.

Definition at line 7153 of file TPad.cxx.

◆ SetBBoxCenterY()

void TPad::SetBBoxCenterY ( const Int_t  y)
overridevirtual

Set Y coordinate of the center of the Pad.

Implements TAttBBox2D.

Definition at line 7162 of file TPad.cxx.

◆ SetBBoxX1()

void TPad::SetBBoxX1 ( const Int_t  x)
overridevirtual

Set lefthandside of BoundingBox to a value (resize in x direction on left)

Implements TAttBBox2D.

Definition at line 7172 of file TPad.cxx.

◆ SetBBoxX2()

void TPad::SetBBoxX2 ( const Int_t  x)
overridevirtual

Set right hand side of BoundingBox to a value (resize in x direction on right)

Implements TAttBBox2D.

Definition at line 7183 of file TPad.cxx.

◆ SetBBoxY1()

void TPad::SetBBoxY1 ( const Int_t  y)
overridevirtual

Set top of BoundingBox to a value (resize in y direction on top)

Implements TAttBBox2D.

Definition at line 7192 of file TPad.cxx.

◆ SetBBoxY2()

void TPad::SetBBoxY2 ( const Int_t  y)
overridevirtual

Set bottom of BoundingBox to a value (resize in y direction on bottom)

Implements TAttBBox2D.

Definition at line 7202 of file TPad.cxx.

◆ SetBorderMode()

void TPad::SetBorderMode ( Short_t  bordermode)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 317 of file TPad.h.

◆ SetBorderSize()

void TPad::SetBorderSize ( Short_t  bordersize)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 318 of file TPad.h.

◆ SetCanvas()

void TPad::SetCanvas ( TCanvas c)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 319 of file TPad.h.

◆ SetCanvasSize()

void TPad::SetCanvasSize ( UInt_t  ww,
UInt_t  wh 
)
overridevirtual

Set canvas size.

Implements TVirtualPad.

Definition at line 2824 of file TPad.cxx.

◆ SetCopyGLDevice()

void TPad::SetCopyGLDevice ( Bool_t  copy)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 359 of file TPad.h.

◆ SetCrosshair()

void TPad::SetCrosshair ( Int_t  crhair = 1)
overridevirtual

Set crosshair active/inactive.

  • If crhair != 0, a crosshair will be drawn in the pad and its sub-pads.
  • If the canvas crhair = 1 , the crosshair spans the full canvas.
  • If the canvas crhair > 1 , the crosshair spans only the pad.

Implements TVirtualPad.

Definition at line 6513 of file TPad.cxx.

◆ SetCursor()

void TPad::SetCursor ( ECursor  cursor)
overridevirtual

Set cursor type.

Implements TVirtualPad.

Definition at line 2832 of file TPad.cxx.

◆ SetDoubleBuffer()

void TPad::SetDoubleBuffer ( Int_t  mode = 1)
overridevirtual

Set double buffer mode ON or OFF.

Implements TVirtualPad.

Definition at line 2840 of file TPad.cxx.

◆ SetDrawOption()

void TPad::SetDrawOption ( Option_t option = "")
inlineoverridevirtual

Set drawing option for object.

This option only affects the drawing style and is stored in the option field of the TObjOptLink supporting a TPad's primitive list (TList). Note that it does not make sense to call object.SetDrawOption(option) before having called object.Draw().

Reimplemented from TObject.

Definition at line 538 of file TPad.h.

◆ SetEditable()

void TPad::SetEditable ( Bool_t  mode = kTRUE)
overridevirtual

Set pad editable yes/no If a pad is not editable:

  • one cannot modify the pad and its objects via the mouse.
  • one cannot add new objects to the pad

Implements TVirtualPad.

Definition at line 5902 of file TPad.cxx.

◆ SetFillStyle()

void TPad::SetFillStyle ( Style_t  fstyle)
overridevirtual

Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.

Reimplemented from TAttFill.

Definition at line 5921 of file TPad.cxx.

◆ SetFixedAspectRatio()

void TPad::SetFixedAspectRatio ( Bool_t  fixed = kTRUE)
overridevirtual

Fix pad aspect ratio to current value if fixed is true.

Implements TVirtualPad.

Definition at line 5878 of file TPad.cxx.

◆ SetGLDevice()

virtual void TPad::SetGLDevice ( Int_t  dev)
inlinevirtual

Definition at line 358 of file TPad.h.

◆ SetGrid()

void TPad::SetGrid ( Int_t  valuex = 1,
Int_t  valuey = 1 
)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 327 of file TPad.h.

◆ SetGridx()

void TPad::SetGridx ( Int_t  value = 1)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 328 of file TPad.h.

◆ SetGridy()

void TPad::SetGridy ( Int_t  value = 1)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 329 of file TPad.h.

◆ SetLogx()

void TPad::SetLogx ( Int_t  value = 1)
overridevirtual

Set Lin/Log scale for X.

  • value = 0 X scale will be linear
  • value = 1 X scale will be logarithmic (base 10)
  • value > 1 reserved for possible support of base e or other

Implements TVirtualPad.

Definition at line 5933 of file TPad.cxx.

◆ SetLogy()

void TPad::SetLogy ( Int_t  value = 1)
overridevirtual

Set Lin/Log scale for Y.

  • value = 0 Y scale will be linear
  • value = 1 Y scale will be logarithmic (base 10)
  • value > 1 reserved for possible support of base e or other

Implements TVirtualPad.

Definition at line 5947 of file TPad.cxx.

◆ SetLogz()

void TPad::SetLogz ( Int_t  value = 1)
overridevirtual

Set Lin/Log scale for Z.

Implements TVirtualPad.

Definition at line 5958 of file TPad.cxx.

◆ SetMaxPickDistance()

void TPad::SetMaxPickDistance ( Int_t  maxPick = 5)
static

static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pick to select an object if its DistancetoPrimitive returns a value < fgMaxPickDistance The default value is 5 pixels.

Setting a smaller value will make picking more precise but also more difficult

Definition at line 6529 of file TPad.cxx.

◆ SetName()

void TPad::SetName ( const char *  name)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 345 of file TPad.h.

◆ SetNumber()

virtual void TPad::SetNumber ( Int_t  number)
inlinevirtual

Definition at line 334 of file TPad.h.

◆ SetPad() [1/2]

void TPad::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 
)
overridevirtual

Set all pad parameters.

Implements TVirtualPad.

Definition at line 6018 of file TPad.cxx.

◆ SetPad() [2/2]

void TPad::SetPad ( Double_t  xlow,
Double_t  ylow,
Double_t  xup,
Double_t  yup 
)
overridevirtual

Set canvas range for pad and resize the pad.

If the aspect ratio was fixed before the call it will be un-fixed.

Implements TVirtualPad.

Definition at line 5970 of file TPad.cxx.

◆ SetPhi()

void TPad::SetPhi ( Double_t  phi = 30)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 352 of file TPad.h.

◆ SetSelected()

void TPad::SetSelected ( TObject obj)
overridevirtual

Set selected.

Implements TVirtualPad.

Definition at line 2848 of file TPad.cxx.

◆ SetTheta()

void TPad::SetTheta ( Double_t  theta = 30)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 351 of file TPad.h.

◆ SetTicks()

void TPad::SetTicks ( Int_t  valuex = 1,
Int_t  valuey = 1 
)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 347 of file TPad.h.

◆ SetTickx()

void TPad::SetTickx ( Int_t  value = 1)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 348 of file TPad.h.

◆ SetTicky()

void TPad::SetTicky ( Int_t  value = 1)
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 349 of file TPad.h.

◆ SetTitle()

void TPad::SetTitle ( const char *  title = "")
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 350 of file TPad.h.

◆ SetToolTipText()

void TPad::SetToolTipText ( const char *  text,
Long_t  delayms = 1000 
)
overridevirtual

Set tool tip text associated with this pad.

The delay is in milliseconds (minimum 250). To remove tool tip call method with text = 0.

Implements TVirtualPad.

Definition at line 6539 of file TPad.cxx.

◆ SetVertical()

void TPad::SetVertical ( Bool_t  vert = kTRUE)
overridevirtual

Set pad vertical (default) or horizontal.

Implements TVirtualPad.

Definition at line 6553 of file TPad.cxx.

◆ SetView()

void TPad::SetView ( TView view = nullptr)
overridevirtual

Set the current TView. Delete previous view if view=0.

Implements TVirtualPad.

Definition at line 6042 of file TPad.cxx.

◆ SetViewer3D()

void TPad::SetViewer3D ( TVirtualViewer3D viewer3d)
inlineoverridevirtual

Reimplemented from TVirtualPad.

Definition at line 356 of file TPad.h.

◆ ShowGuidelines()

void TPad::ShowGuidelines ( TObject object,
const Int_t  event,
const char  mode = 'i',
const bool  cling = true 
)
overridevirtual

Shows lines to indicate if a TAttBBox2D object is aligned to the center or to another object, shows distance arrows if two objects on screen have the same distance to another object Call from primitive in Execute Event, in ButtonMotion after the new coordinates have been set, to 'stick' once when button is up to delete lines.

modes: t (Top), b (bottom), l (left), r (right), i (inside) in resize modes (t,b,l,r) only size arrows are sticky

in mode, the function gets the point on the element that is clicked to move (i) or resize (all others). The expected values are:

Implements TVirtualPad.

Definition at line 6197 of file TPad.cxx.

◆ StartEditing()

virtual void TPad::StartEditing ( )
inlinevirtual

Definition at line 407 of file TPad.h.

◆ Update()

void TPad::Update ( )
overridevirtual

Update pad.

Implements TVirtualPad.

Reimplemented in TEvePad.

Definition at line 2856 of file TPad.cxx.

◆ UseCurrentStyle()

void TPad::UseCurrentStyle ( )
overridevirtual

Force a copy of current style for all objects in pad.

Reimplemented from TObject.

Definition at line 6771 of file TPad.cxx.

◆ UtoAbsPixel()

Int_t TPad::UtoAbsPixel ( Double_t  u) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 363 of file TPad.h.

◆ UtoPixel()

Int_t TPad::UtoPixel ( Double_t  u) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 454 of file TPad.h.

◆ VtoAbsPixel()

Int_t TPad::VtoAbsPixel ( Double_t  v) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 364 of file TPad.h.

◆ VtoPixel()

Int_t TPad::VtoPixel ( Double_t  v) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 466 of file TPad.h.

◆ WaitPrimitive()

TObject * TPad::WaitPrimitive ( const char *  pname = "",
const char *  emode = "" 
)
overridevirtual

Loop and sleep until a primitive with name=pname is found in the pad.

If emode is given, the editor is automatically set to emode, ie it is not required to have the editor control bar.

The possible values for emode are:

  • emode = "" (default). User will select the mode via the editor bar
  • emode = "Arc", "Line", "Arrow", "Button", "Diamond", "Ellipse",
  • emode = "Pad","pave", "PaveLabel","PaveText", "PavesText",
  • emode = "PolyLine", "CurlyLine", "CurlyArc", "Text", "Marker", "CutG"

If emode is specified and it is not valid, "PolyLine" is assumed. If emode is not specified or ="", an attempt is to use pname[1...]

for example if pname="TArc", emode="Arc" will be assumed. When this function is called within a macro, the macro execution is suspended until a primitive corresponding to the arguments is found in the pad.

If CRTL/C is typed in the pad, the function returns 0.

While this function is executing, one can use the mouse, interact with the graphics pads, use the Inspector, Browser, TreeViewer, etc.

Examples:

c1.WaitPrimitive(); // Return the first created primitive
// whatever it is.
// If a double-click with the mouse is executed
// in the pad or any key pressed, the function
// returns 0.
c1.WaitPrimitive("ggg"); // Set the editor in mode "PolyLine/Graph"
// Create a polyline, then using the context
// menu item "SetName", change the name
// of the created TGraph to "ggg"
c1.WaitPrimitive("TArc");// Set the editor in mode "Arc". Returns
// as soon as a TArc object is created.
c1.WaitPrimitive("lat","Text"); // Set the editor in Text/Latex mode.
// Create a text object, then Set its name to "lat"

The following macro waits for 10 primitives of any type to be created.

{
TCanvas c1("c1");
TObject *obj;
for (Int_t i=0;i<10;i++) {
obj = gPad->WaitPrimitive();
if (!obj) break;
printf("Loop i=%d, found objIsA=%s, name=%s\n",
i,obj->ClassName(),obj->GetName());
}
}
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:359
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:130

If ROOT runs in batch mode a call to this method does nothing.

Implements TVirtualPad.

Definition at line 6891 of file TPad.cxx.

◆ x3d()

void TPad::x3d ( Option_t type = "")
virtual

Deprecated: use TPad::GetViewer3D() instead.

Reimplemented in TButton, TDialogCanvas, and TInspectCanvas.

Definition at line 6976 of file TPad.cxx.

◆ XtoAbsPixel()

Int_t TPad::XtoAbsPixel ( Double_t  x) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 478 of file TPad.h.

◆ XtoPad()

Double_t TPad::XtoPad ( Double_t  x) const
overridevirtual

Convert x from X to pad.

Implements TVirtualPad.

Definition at line 3423 of file TPad.cxx.

◆ XtoPixel()

Int_t TPad::XtoPixel ( Double_t  x) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 488 of file TPad.h.

◆ XYtoAbsPixel()

void TPad::XYtoAbsPixel ( Double_t  x,
Double_t  y,
Int_t xpixel,
Int_t ypixel 
) const
inlinevirtual

Definition at line 522 of file TPad.h.

◆ XYtoPixel()

void TPad::XYtoPixel ( Double_t  x,
Double_t  y,
Int_t xpixel,
Int_t ypixel 
) const
inlinevirtual

Definition at line 530 of file TPad.h.

◆ YtoAbsPixel()

Int_t TPad::YtoAbsPixel ( Double_t  y) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 500 of file TPad.h.

◆ YtoPad()

Double_t TPad::YtoPad ( Double_t  y) const
overridevirtual

Convert y from Y to pad.

Implements TVirtualPad.

Definition at line 3435 of file TPad.cxx.

◆ YtoPixel()

Int_t TPad::YtoPixel ( Double_t  y) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 510 of file TPad.h.

Member Data Documentation

◆ fAbsCoord

Bool_t TPad::fAbsCoord
protected

Use absolute coordinates.

Definition at line 98 of file TPad.h.

◆ fAbsHNDC

Double_t TPad::fAbsHNDC
protected

Absolute Height of pad along Y in NDC.

Definition at line 68 of file TPad.h.

◆ fAbsPixeltoXk

Double_t TPad::fAbsPixeltoXk
protected

Conversion coefficient for absolute pixel to X World.

Definition at line 51 of file TPad.h.

◆ fAbsPixeltoYk

Double_t TPad::fAbsPixeltoYk
protected

Conversion coefficient for absolute pixel to Y World.

Definition at line 54 of file TPad.h.

◆ fAbsWNDC

Double_t TPad::fAbsWNDC
protected

Absolute Width of pad along X in NDC.

Definition at line 67 of file TPad.h.

◆ fAbsXlowNDC

Double_t TPad::fAbsXlowNDC
protected

Absolute X top left corner of pad in NDC [0,1].

Definition at line 65 of file TPad.h.

◆ fAbsYlowNDC

Double_t TPad::fAbsYlowNDC
protected

Absolute Y top left corner of pad in NDC [0,1].

Definition at line 66 of file TPad.h.

◆ fAspectRatio

Double_t TPad::fAspectRatio
protected

ratio of w/h in case of fixed ratio

Definition at line 78 of file TPad.h.

◆ fBorderMode

Short_t TPad::fBorderMode
protected

Bordermode (-1=down, 0 = no border, 1=up)

Definition at line 94 of file TPad.h.

◆ fBorderSize

Short_t TPad::fBorderSize
protected

pad bordersize in pixels

Definition at line 93 of file TPad.h.

◆ fCanvas

TCanvas* TPad::fCanvas
protected

! Pointer to mother canvas

Definition at line 102 of file TPad.h.

◆ fCGnx

Int_t TPad::fCGnx
protected

! Size of the collide grid along x

Definition at line 115 of file TPad.h.

◆ fCGny

Int_t TPad::fCGny
protected

! Size of the collide grid along y

Definition at line 116 of file TPad.h.

◆ fCollideGrid

Bool_t* TPad::fCollideGrid
protected

! Grid used to find empty space when adding a box (Legend) in a pad

Definition at line 114 of file TPad.h.

◆ fCopyGLDevice

Bool_t TPad::fCopyGLDevice
protected

!

Definition at line 82 of file TPad.h.

◆ fCrosshair

Int_t TPad::fCrosshair
protected

Crosshair type (0 if no crosshair requested)

Definition at line 91 of file TPad.h.

◆ fCrosshairPos

Int_t TPad::fCrosshairPos
protected

Position of crosshair.

Definition at line 92 of file TPad.h.

◆ fEditable

Bool_t TPad::fEditable
protected

True if canvas is editable.

Definition at line 99 of file TPad.h.

◆ fEmbeddedGL

Bool_t TPad::fEmbeddedGL
protected

!

Definition at line 83 of file TPad.h.

◆ fExecs

TList* TPad::fExecs
protected

List of commands to be executed when a pad event occurs.

Definition at line 104 of file TPad.h.

◆ fFixedAspectRatio

Bool_t TPad::fFixedAspectRatio
protected

True if fixed aspect ratio.

Definition at line 100 of file TPad.h.

◆ fFrame

TFrame* TPad::fFrame
protected

! Pointer to 2-D frame (if one exists)

Definition at line 107 of file TPad.h.

◆ fGLDevice

Int_t TPad::fGLDevice
protected

! OpenGL off-screen pixmap identifier

Definition at line 81 of file TPad.h.

◆ fgMaxPickDistance

Int_t TPad::fgMaxPickDistance = 5
staticprotected

Maximum Pick Distance.

Definition at line 111 of file TPad.h.

◆ fGridx

Bool_t TPad::fGridx
protected

Set to true if grid along X.

Definition at line 96 of file TPad.h.

◆ fGridy

Bool_t TPad::fGridy
protected

Set to true if grid along Y.

Definition at line 97 of file TPad.h.

◆ fHNDC

Double_t TPad::fHNDC
protected

Height of pad along Y in Normalized Coordinates (NDC)

Definition at line 63 of file TPad.h.

◆ fLogx

Int_t TPad::fLogx
protected

(=0 if X linear scale, =1 if log scale)

Definition at line 87 of file TPad.h.

◆ fLogy

Int_t TPad::fLogy
protected

(=0 if Y linear scale, =1 if log scale)

Definition at line 88 of file TPad.h.

◆ fLogz

Int_t TPad::fLogz
protected

(=0 if Z linear scale, =1 if log scale)

Definition at line 89 of file TPad.h.

◆ fModified

Bool_t TPad::fModified
protected

Set to true when pad is modified.

Definition at line 95 of file TPad.h.

◆ fMother

TPad* TPad::fMother
protected

! pointer to mother of the list

Definition at line 101 of file TPad.h.

◆ fName

TString TPad::fName
protected

Pad name.

Definition at line 105 of file TPad.h.

◆ fNextPaletteColor

Int_t TPad::fNextPaletteColor
protected

Next automatic color.

Definition at line 113 of file TPad.h.

◆ fNumber

Int_t TPad::fNumber
protected

pad number identifier

Definition at line 84 of file TPad.h.

◆ fNumPaletteColor

Int_t TPad::fNumPaletteColor
protected

Number of objects with an automatic color.

Definition at line 112 of file TPad.h.

◆ fPadPaint

Int_t TPad::fPadPaint
protected

Set to 1 while painting the pad.

Definition at line 90 of file TPad.h.

◆ fPadPointer

TObject* TPad::fPadPointer
protected

! free pointer

Definition at line 109 of file TPad.h.

◆ fPadView3D

TObject* TPad::fPadView3D
protected

! 3D View of this TPad

Definition at line 110 of file TPad.h.

◆ fPhi

Double_t TPad::fPhi
protected

phi angle to view as lego/surface

Definition at line 76 of file TPad.h.

◆ fPixeltoX

Double_t TPad::fPixeltoX
protected

xworld = fPixeltoXk + fPixeltoX*xpixel

Definition at line 53 of file TPad.h.

◆ fPixeltoXk

Double_t TPad::fPixeltoXk
protected

Conversion coefficient for pixel to X World.

Definition at line 52 of file TPad.h.

◆ fPixeltoY

Double_t TPad::fPixeltoY
protected

yworld = fPixeltoYk + fPixeltoY*ypixel

Definition at line 56 of file TPad.h.

◆ fPixeltoYk

Double_t TPad::fPixeltoYk
protected

Conversion coefficient for pixel to Y World.

Definition at line 55 of file TPad.h.

◆ fPixmapID

Int_t TPad::fPixmapID
protected

! Off-screen pixmap identifier

Definition at line 80 of file TPad.h.

◆ fPrimitives

TList* TPad::fPrimitives
protected

->List of primitives (subpads)

Definition at line 103 of file TPad.h.

◆ fTheta

Double_t TPad::fTheta
protected

theta angle to view as lego/surface

Definition at line 75 of file TPad.h.

◆ fTickx

Int_t TPad::fTickx
protected

Set to 1 if tick marks along X.

Definition at line 85 of file TPad.h.

◆ fTicky

Int_t TPad::fTicky
protected

Set to 1 if tick marks along Y.

Definition at line 86 of file TPad.h.

◆ fTip

TObject* TPad::fTip
private

! tool tip associated with box

Definition at line 29 of file TPad.h.

◆ fTitle

TString TPad::fTitle
protected

Pad title.

Definition at line 106 of file TPad.h.

◆ fUtoAbsPixelk

Double_t TPad::fUtoAbsPixelk
protected

Conversion coefficient for U NDC to absolute pixel.

Definition at line 44 of file TPad.h.

◆ fUtoPixel

Double_t TPad::fUtoPixel
protected

xpixel = fUtoPixelk + fUtoPixel*undc

Definition at line 46 of file TPad.h.

◆ fUtoPixelk

Double_t TPad::fUtoPixelk
protected

Conversion coefficient for U NDC to pixel.

Definition at line 45 of file TPad.h.

◆ fUxmax

Double_t TPad::fUxmax
protected

Maximum value on the X axis.

Definition at line 72 of file TPad.h.

◆ fUxmin

Double_t TPad::fUxmin
protected

Minimum value on the X axis.

Definition at line 70 of file TPad.h.

◆ fUymax

Double_t TPad::fUymax
protected

Maximum value on the Y axis.

Definition at line 73 of file TPad.h.

◆ fUymin

Double_t TPad::fUymin
protected

Minimum value on the Y axis.

Definition at line 71 of file TPad.h.

◆ fView

TView* TPad::fView
protected

! Pointer to 3-D view (if one exists)

Definition at line 108 of file TPad.h.

◆ fViewer3D

TVirtualViewer3D* TPad::fViewer3D
protected

! Current 3D viewer

Definition at line 119 of file TPad.h.

◆ fVtoAbsPixelk

Double_t TPad::fVtoAbsPixelk
protected

Conversion coefficient for V NDC to absolute pixel.

Definition at line 47 of file TPad.h.

◆ fVtoPixel

Double_t TPad::fVtoPixel
protected

ypixel = fVtoPixelk + fVtoPixel*vndc

Definition at line 49 of file TPad.h.

◆ fVtoPixelk

Double_t TPad::fVtoPixelk
protected

Conversion coefficient for V NDC to pixel.

Definition at line 48 of file TPad.h.

◆ fWNDC

Double_t TPad::fWNDC
protected

Width of pad along X in Normalized Coordinates (NDC)

Definition at line 62 of file TPad.h.

◆ fX1

Double_t TPad::fX1
protected

X of lower X coordinate.

Definition at line 32 of file TPad.h.

◆ fX2

Double_t TPad::fX2
protected

X of upper X coordinate.

Definition at line 34 of file TPad.h.

◆ fXlowNDC

Double_t TPad::fXlowNDC
protected

X bottom left corner of pad in NDC [0,1].

Definition at line 58 of file TPad.h.

◆ fXtoAbsPixelk

Double_t TPad::fXtoAbsPixelk
protected

Conversion coefficient for X World to absolute pixel.

Definition at line 37 of file TPad.h.

◆ fXtoPixel

Double_t TPad::fXtoPixel
protected

xpixel = fXtoPixelk + fXtoPixel*xworld

Definition at line 39 of file TPad.h.

◆ fXtoPixelk

Double_t TPad::fXtoPixelk
protected

Conversion coefficient for X World to pixel.

Definition at line 38 of file TPad.h.

◆ fXUpNDC

Double_t TPad::fXUpNDC
protected

Definition at line 60 of file TPad.h.

◆ fY1

Double_t TPad::fY1
protected

Y of lower Y coordinate.

Definition at line 33 of file TPad.h.

◆ fY2

Double_t TPad::fY2
protected

Y of upper Y coordinate.

Definition at line 35 of file TPad.h.

◆ fYlowNDC

Double_t TPad::fYlowNDC
protected

Y bottom left corner of pad in NDC [0,1].

Definition at line 59 of file TPad.h.

◆ fYtoAbsPixelk

Double_t TPad::fYtoAbsPixelk
protected

Conversion coefficient for Y World to absolute pixel.

Definition at line 40 of file TPad.h.

◆ fYtoPixel

Double_t TPad::fYtoPixel
protected

ypixel = fYtoPixelk + fYtoPixel*yworld

Definition at line 42 of file TPad.h.

◆ fYtoPixelk

Double_t TPad::fYtoPixelk
protected

Conversion coefficient for Y World to pixel.

Definition at line 41 of file TPad.h.

◆ fYUpNDC

Double_t TPad::fYUpNDC
protected

Definition at line 61 of file TPad.h.

Libraries for TPad:
[legend]

The documentation for this class was generated from the following files: