101 if (!
x || !
y)
return;
117 if (
fX)
delete []
fX;
118 if (
fY)
delete []
fY;
131 if (
fX)
delete []
fX;
132 if (
fY)
delete []
fY;
181 const Int_t big = 9999;
185 Int_t distance = big;
187 for (i=0;i<
Size();i++) {
191 if (
d < distance) distance =
d;
232 printf(
"TPolyMarker N=%d\n",
fN);
248 Error(
"Add",
"Attempt to add object of class: %s to a %s",pm->
ClassName(),this->ClassName());
251 npoints += pm->
Size();
263 for (
Int_t i=0;i<np;i++) {
288 if (
gPad->GetLogx()) {
290 for (
Int_t ix=0;ix<
n;ix++) xx[ix] =
gPad->XtoPad(
x[ix]);
292 if (
gPad->GetLogy()) {
294 for (
Int_t iy=0;iy<
n;iy++) yy[iy] =
gPad->YtoPad(
y[iy]);
296 gPad->PaintPolyMarker(
n,xx,yy,option);
297 if (
x != xx)
delete [] xx;
298 if (
y != yy)
delete [] yy;
306 printf(
"TPolyMarker N=%d\n",
fN);
316 out<<
" Double_t *dum = 0;"<<std::endl;
320 out<<
" TPolyMarker *";
322 out<<
"pmarker = new TPolyMarker("<<
fN<<
",dum,dum,"<<quote<<
fOption<<quote<<
");"<<std::endl;
327 out<<
" pmarker->SetPoint("<<i<<
","<<
fX[i]<<
","<<
fY[i]<<
");"<<std::endl;
329 if (!strstr(option,
"nodraw")) {
330 out<<
" pmarker->Draw("
331 <<quote<<option<<quote<<
");"<<std::endl;
408 if (
fX)
delete []
fX;
409 if (
fY)
delete []
fY;
434 if (
fX)
delete []
fX;
435 if (
fY)
delete []
fY;
449void TPolyMarker::Streamer(
TBuffer &R__b)
459 TObject::Streamer(R__b);
460 TAttMarker::Streamer(R__b);
466 for (i=0;i<
fN;i++) {R__b >> xold;
fX[i] = xold;}
467 for (i=0;i<
fN;i++) {R__b >> yold;
fY[i] = yold;}
Binding & operator=(OUT(*fun)(void))
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.
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Collection abstract base class.
Mother of all ROOT objects.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
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.
virtual void Copy(TObject &polymarker) const
Copy this to obj.
virtual void Paint(Option_t *option="")
Paint.
virtual Int_t Size() const
virtual Int_t Merge(TCollection *list)
Merge polymarkers in the collection in this polymarker.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
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.
virtual Int_t SetNextPoint(Double_t x, Double_t y)
Set point following LastPoint to x, y.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual void Draw(Option_t *option="")
Draw.
virtual ~TPolyMarker()
Destructor.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a polymarker.
virtual void Print(Option_t *option="") const
Print polymarker.
virtual void ls(Option_t *option="") const
ls.
virtual void SetPoint(Int_t point, Double_t x, Double_t y)
Set point number n.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Short_t Max(Short_t a, Short_t b)