112 xx =
gPad->AbsPixeltoX(px);
113 yy =
gPad->AbsPixeltoY(py);
117 if(xx > thisx-2*
fSize && xx < thisx && yy > thisy-
fSize && yy<thisy+
fSize) dist = 0;
119 if(xx > thisx-2*
fSize && xx < thisx && yy > thisy-
fSize && yy<thisy+
fSize) dist = 0;
121 if(yy > thisy-2*
fSize && yy < thisy && xx > thisx-
fSize && xx<thisx+
fSize) dist = 0;
123 if(yy > thisy-2*
fSize && yy < thisy && xx > thisx-
fSize && xx<thisx+
fSize) dist = 0;
146 static Int_t pxold, pyold;
147 static Int_t mindragged = -1;
148 Int_t plx1,plx2,ply1,ply2;
150 Double_t xx,yy,txxmin=0,txxmax=0,tyymin=0,tyymax=0;
152 xx =
gPad->AbsPixeltoX(px);
153 yy =
gPad->AbsPixeltoY(py);
157 plx1 =
gPad->XtoAbsPixel(txxmin-2*
fSize);
158 plx2 =
gPad->XtoAbsPixel(txxmax-2*
fSize);
164 ply1 =
gPad->YtoAbsPixel(tyymin-2*
fSize);
165 ply2 =
gPad->YtoAbsPixel(tyymax-2*
fSize);
176 if ((vert && yy<tyymax-
fSize) || (!vert && xx < txxmax-
fSize)) {
187 gVirtualX->DrawLine(plx1,ply1,plx2,ply2);
211 if((vert && yy > frame->
GetY1() && yy < frame->
GetY2()) ||
212 (!vert && xx > frame->
GetX1() && xx < frame->
GetX2())){
263 tyy =
gPad->AbsPixeltoY(pos);
266 txx =
gPad->AbsPixeltoX(pos);
302 tx[0]=
gPad->XtoAbsPixel(txx);
303 tx[1]=tx[4]=
gPad->XtoAbsPixel(txx-
fSize);
304 ty[0]=ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy);
305 tx[2]=tx[3]=
gPad->XtoAbsPixel(txx-2*
fSize);
309 ty[0]=
gPad->YtoAbsPixel(tyy);
310 ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy-
fSize);
311 tx[0]=tx[1]=tx[4]=
gPad->XtoAbsPixel(txx);
312 ty[2]=ty[3]=
gPad->YtoAbsPixel(tyy-2*
fSize);
317 for(
UInt_t ui=0;ui<5;++ui) slider[ui] =
TPoint(tx[ui],ty[ui]);
329 tyy =
gPad->AbsPixeltoY(pos);
332 txx =
gPad->AbsPixeltoX(pos);
338 tx[0]=
gPad->XtoAbsPixel(txx);
339 tx[1]=tx[4]=
gPad->XtoAbsPixel(txx-
fSize);
340 ty[0]=ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy);
341 tx[2]=tx[3]=
gPad->XtoAbsPixel(txx-2*
fSize);
345 ty[0]=
gPad->YtoAbsPixel(tyy);
346 ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy-
fSize);
347 tx[0]=tx[1]=tx[4]=
gPad->XtoAbsPixel(txx);
348 ty[2]=ty[3]=
gPad->YtoAbsPixel(tyy-2*
fSize);
353 for(
UInt_t ui=0;ui<5;++ui) slider[ui] =
TPoint(tx[ui],ty[ui]);
362 return evtval>=
fMin && evtval<=
fMax;
395 x[0] = xx; x[1]=x[4]=xx-
fSize; x[2]=x[3]=xx-2*
fSize;
396 y[0]=y[1]=y[4]=yy; y[2] = yy+
fSize; y[3] = yy-
fSize;
398 y[0] = yy; y[1]=y[4]=yy-
fSize; y[2]=y[3]= yy-2*
fSize;
399 x[0]=x[1]=x[4]=xx; x[2]=xx-
fSize; x[3] = xx+
fSize;
402 p->SetFillStyle(1001);
404 p->PaintPolyLine(4,&x[1],&y[1],
"f");
406 p->SetFillStyle(3001);
407 p->PaintPolyLine(4,&x[1],&y[1],
"f");
409 p->PaintPolyLine(5,x,y);
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord...
double dist(Rotation3D const &r1, Rotation3D const &r2)
void PaintSlider(Double_t value, Bool_t fill=kFALSE)
Paint a slider.
TPoint * GetSliderPoints(Double_t value)
Return the points to paint the needles at "value".
TParallelCoordSelect()
Default constructor.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
void CleanUpSelections(TParallelCoordRange *range)
Clean up the selections from the ranges which could have been deleted when a variable has been delete...
virtual void Delete(const Option_t *options="")
Delete the range.
TParallelCoordSelect * GetCurrentSelection()
Return the selection currently being edited.
virtual void Draw(Option_t *options="")
Draw a TParallelCoordRange.
Double_t GetValuefromXY(Double_t x, Double_t y)
Get the value corresponding to the position.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
A TParallelCoordRange is a range used for parallel coordinates plots.
~TParallelCoordRange()
Destructor.
void GetXYfromValue(Double_t value, Double_t &x, Double_t &y)
Get a position corresponding to the value on the axis.
virtual void AddLast(TObject *obj)
Add object at the end of the list.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Double_t GetCurrentMin() const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute the distance to the primitive.
The TNamed class is the base class for all named ROOT classes.
TParallelCoordSelect * fSelect
virtual void ExecuteEvent(Int_t entry, Int_t px, Int_t py)
Execute the entry.
Double_t GetCurrentMax() const
virtual void SetLineColor(Color_t col)
Set the selection line color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
~TParallelCoordSelect()
Destructor.
TParallelCoordVar * GetVar()
virtual void SendToBack()
Make the selection which owns the range to be drawn under all the others.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual Color_t GetLineColor() const
Return the line color.
TPoint * GetBindingLinePoints(Int_t pos, Int_t mindragged)
Return the points of the line binding the two needles of the range.
virtual void SetLineWidth(Width_t wid)
Set the selection line width.
TParallelCoordSelect * SetCurrentSelection(const char *title)
Set the selection being edited.
virtual void Paint(Option_t *options)
Paint a TParallelCoordRange.
static constexpr double s
TParallelCoord * GetParallel()
Bool_t IsIn(Double_t evtval)
Evaluate if the given value is within the range or not.
TParallelCoordRange()
Default constructor.
virtual void BringOnTop()
Make the selection which owns the range to be drawn on top of the others.
virtual void Print(Option_t *options) const
Print info about the range.
Defined by an array on N points in a 2-D space.
void SetShowRanges(Bool_t s)
Show the ranges needles.
virtual const char * GetTitle() const
Returns title of object.
void SetActivated(Bool_t on)
Activate the selection.