267 py =
gPad->GetWh() - py;
271 const Int_t glContext =
gPad->GetGLDevice();
273 if (glContext != -1) {
280 Error(
"DistancetoPrimitive",
281 "Attempt to use TGLHistPainter, while the current pad (gPad) does not support gl");
321 const Int_t glContext =
gPad->GetGLDevice();
323 if (glContext == -1) {
324 Error(
"ExecuteEvent",
325 "Attempt to use TGLHistPainter, while the current pad (gPad) does not support gl");
453 static char errMsg[] = {
"TGLHistPainter::GetObjectInfo: Error in a hist painter\n" };
516 if (!std::strcmp(
m,
"SetF3"))
610 if (glContext != -1) {
632Bool_t FindAndRemoveOption(
TString &options,
const char *toFind)
662 if (FindAndRemoveOption(options,
"pol"))
664 if (FindAndRemoveOption(options,
"cyl"))
666 if (FindAndRemoveOption(options,
"sph"))
670 if (FindAndRemoveOption(options,
"lego"))
672 if (FindAndRemoveOption(options,
"surf"))
674 if (FindAndRemoveOption(options,
"tf3"))
676 if (FindAndRemoveOption(options,
"box"))
678 if (FindAndRemoveOption(options,
"iso"))
680 if (FindAndRemoveOption(options,
"col"))
684 if (FindAndRemoveOption(options,
"bb"))
686 if (FindAndRemoveOption(options,
"fb"))
690 if (FindAndRemoveOption(options,
"a"))
779 vp.
X() =
Int_t(vp.
X() * scale);
780 vp.
Y() =
Int_t(vp.
Y() * scale);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
A 3-Dim function with parameters.
TGL5DPainter implements "gl5d" option for TTree::Draw.
Paints TH3 histograms by rendering variable-sized boxes matching the bin contents.
The histogram painter class using OpenGL.
void SetHistogram(TH1 *hist) override
Set histogram.
void PaintStat(Int_t dostat, TF1 *fit) override
Paint statistics.
TGLPlotCoordinates fCoord
void SetHighlight() override
Set highlight mode.
PlotOption_t ParsePaintOption(const TString &option) const
In principle, we can have several conflicting options: "lego surf pol sph", surfbb: surf,...
void CreatePainter(const PlotOption_t &parsed, const TString &option)
Create painter.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute event.
void ProcessMessage(const char *message, const TObject *obj) override
Process message.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Selects plot or axis.
void SetShowProjection(const char *option, Int_t nbins) override
Set show projection.
void PadToViewport(Bool_t selectionPass=kFALSE)
void SetStack(TList *stack) override
Set stack.
void SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX) override
Set show projectionXY.
TList * GetStack() const override
Get stack.
std::unique_ptr< TGLPlotPainter > fGLPainter
std::unique_ptr< TVirtualHistPainter > fDefaultPainter
void Paint(Option_t *option) override
Final-overrider for TObject::Paint.
void DrawPanel() override
Default implementation is OK This function is called from a context menu after right click on a plot'...
Int_t MakeCuts(char *cutsOpt) override
Make cuts.
TGLHistPainter(TH1 *hist)
ROOT does not use exceptions, so, if default painter's creation failed, fDefaultPainter is 0.
TList * GetContourList(Double_t contour) const override
Get contour list.
Bool_t IsInside(Int_t x, Int_t y) override
Returns kTRUE if the cell ix, iy is inside one of the graphical cuts.
char * GetObjectInfo(Int_t px, Int_t py) const override
Overrides TObject::GetObjectInfo.
Plot-painter implementing LEGO rendering of TH2 histograms in cartesian, polar, cylindrical and spher...
A parametric surface is a surface defined by a parametric equation, involving two parameters (u,...
Bool_t ViewportChanged() const
void SetViewport(const TGLRect &vp)
Setup viewport, if it was changed, plus reset arcball.
void RotateCamera(Int_t px, Int_t py)
Mouse movement.
void StartRotation(Int_t px, Int_t py)
User clicks somewhere (px, py).
void SetXLog(Bool_t xLog)
If log changed, sections must be reset, set fModified.
void SetCoordType(EGLCoordType type)
If coord type was changed, plot must reset sections (if any), set fModified.
void ResetModified()
Reset modified.
void SetZLog(Bool_t zLog)
If log changed, sections must be reset, set fModified.
void SetYLog(Bool_t yLog)
If log changed, sections must be reset, set fModified.
Viewport (pixel base) 2D rectangle class.
Implements painting of TH2 with "SURF" option.
Plot-painter for TF3 functions.
static void InitializeIfNeeded()
Initialize globals that require other libraries to be initialized.
static Float_t GetScreenScalingFactor()
Returns scaling factor between screen points and GL viewport pixels.
Paint TH3 histograms as "voxels" - colored boxes, transparent if transfer function was specified.
TH1 is the base class of all histogram classes in ROOT.
2D Histogram with Polygonal Bins
Mother of all ROOT objects.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TString & Remove(Ssiz_t pos)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Abstract interface to a histogram painter.