101 if (!
x || !
y)
return;
112 pm.TPolyMarker::Copy(*
this);
122 if (
fX)
delete []
fX;
123 if (
fY)
delete []
fY;
135 polymarker.TPolyMarker::Copy(*
this);
174 const Int_t big = 9999;
178 Int_t distance = big;
180 for (i=0;i<
Size();i++) {
184 if (
d < distance) distance =
d;
225 printf(
"TPolyMarker N=%d\n",
fN);
241 Error(
"Add",
"Attempt to add object of class: %s to a %s",pm->
ClassName(),this->ClassName());
244 npoints += pm->
Size();
281 if (
gPad->GetLogx()) {
283 for (
Int_t ix=0;ix<
n;ix++) xx[ix] =
gPad->XtoPad(
x[ix]);
285 if (
gPad->GetLogy()) {
287 for (
Int_t iy=0;iy<
n;iy++) yy[iy] =
gPad->YtoPad(
y[iy]);
290 if (
x != xx)
delete [] xx;
291 if (
y != yy)
delete [] yy;
299 printf(
"TPolyMarker N=%d\n",
fN);
309 out<<
" Double_t *dum = 0;"<<std::endl;
313 out<<
" TPolyMarker *";
315 out<<
"pmarker = new TPolyMarker("<<
fN<<
",dum,dum,"<<quote<<
fOption<<quote<<
");"<<std::endl;
320 out<<
" pmarker->SetPoint("<<i<<
","<<
fX[i]<<
","<<
fY[i]<<
");"<<std::endl;
322 if (!strstr(
option,
"nodraw")) {
323 out<<
" pmarker->Draw("
324 <<quote<<
option<<quote<<
");"<<std::endl;
401 if (
fX)
delete []
fX;
402 if (
fY)
delete []
fY;
427 if (
fX)
delete []
fX;
428 if (
fY)
delete []
fY;
459 for (i=0;i<
fN;i++) {R__b >> xold;
fX[i] = xold;}
460 for (i=0;i<
fN;i++) {R__b >> yold;
fY[i] = yold;}
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 np
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual void Modify()
Change current marker attributes if necessary.
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
virtual void Streamer(TBuffer &)
Buffer base class used for serializing objects.
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Collection abstract base class.
Mother of all ROOT objects.
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Copy(TObject &object) const
Copy this to obj.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kCanDelete
if object in a list can be deleted
A PolyMarker is defined by an array on N points in a 2-D space.
TPolyMarker & operator=(const TPolyMarker &)
assignment operator
virtual void PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Paint polymarker.
void Copy(TObject &polymarker) const override
Copy this to obj.
void Print(Option_t *option="") const override
Print polymarker.
Double_t * fY
[fN] Array of Y coordinates
virtual Int_t Size() const
virtual Int_t Merge(TCollection *list)
Merge polymarkers in the collection in this polymarker.
TPolyMarker()
Default constructor.
virtual void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Draw polymarker.
virtual void SetPolyMarker(Int_t n)
If n <= 0 the current arrays of points are deleted.
void Streamer(TBuffer &) override
Stream a class object.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Int_t fN
Number of points.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
~TPolyMarker() override
Destructor.
virtual Int_t SetNextPoint(Double_t x, Double_t y)
Set point following LastPoint to x, y.
Int_t fLastPoint
The index of the last filled point.
void Paint(Option_t *option="") override
Paint.
Double_t * fX
[fN] Array of X coordinates
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a polymarker.
void Draw(Option_t *option="") override
Draw.
virtual void SetPoint(Int_t point, Double_t x, Double_t y)
Set point number n.
TClass * IsA() const override
void ls(Option_t *option="") const override
ls.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
virtual void Streamer(TBuffer &)
Stream a string object.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.