82 for (
Int_t i=0; i<
fN;i++) {
fX[i] = x[i];
fY[i] = y[i]; }
105 if (!x || !y)
return;
106 for (
Int_t i=0; i<
fN;i++) {
fX[i] = x[i];
fY[i] = y[i]; }
117 TAttMarker::operator=(pm);
121 if (
fX)
delete []
fX;
122 if (
fY)
delete []
fY;
135 if (
fX)
delete []
fX;
136 if (
fY)
delete []
fY;
188 const Int_t big = 9999;
191 Int_t i, pxp, pyp, d;
192 Int_t distance = big;
194 for (i=0;i<
Size();i++) {
198 if (d < distance) distance = d;
243 printf(
"TPolyMarker N=%d\n",
fN);
263 npoints += pm->
Size();
275 for (
Int_t i=0;i<np;i++) {
302 if (
gPad->GetLogx()) {
304 for (
Int_t ix=0;ix<
n;ix++) xx[ix] =
gPad->XtoPad(x[ix]);
306 if (
gPad->GetLogy()) {
308 for (
Int_t iy=0;iy<
n;iy++) yy[iy] =
gPad->YtoPad(y[iy]);
310 gPad->PaintPolyMarker(n,xx,yy,option);
311 if (x != xx)
delete [] xx;
312 if (y != yy)
delete [] yy;
321 printf(
"TPolyMarker N=%d\n",
fN);
332 out<<
" Double_t *dum = 0;"<<std::endl;
336 out<<
" TPolyMarker *";
338 out<<
"pmarker = new TPolyMarker("<<
fN<<
",dum,dum,"<<quote<<
fOption<<quote<<
");"<<std::endl;
343 out<<
" pmarker->SetPoint("<<i<<
","<<
fX[i]<<
","<<
fY[i]<<
");"<<std::endl;
345 out<<
" pmarker->Draw(" 346 <<quote<<option<<quote<<
");"<<std::endl;
370 if (!
fX || !
fY || n >=
fN) {
377 memset(&savex[
fN],0,(newN-fN)*
sizeof(
Double_t));
382 memset(&savey[
fN],0,(newN-fN)*
sizeof(
Double_t));
426 if (
fX)
delete []
fX;
427 if (
fY)
delete []
fY;
453 if (
fX)
delete []
fX;
454 if (
fY)
delete []
fY;
469 void TPolyMarker::Streamer(
TBuffer &R__b)
479 TObject::Streamer(R__b);
480 TAttMarker::Streamer(R__b);
486 for (i=0;i<
fN;i++) {R__b >> xold;
fX[i] = xold;}
487 for (i=0;i<
fN;i++) {R__b >> yold;
fY[i] = yold;}
virtual void Draw(Option_t *option="")
Draw.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Draw polymarker.
virtual void PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Paint polymarker.
virtual ~TPolyMarker()
Desctructor.
Buffer base class used for serializing objects.
TPolyMarker()
Default constructor.
virtual Int_t Merge(TCollection *list)
Merge polymarkers in the collection in this polymarker.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t Size() const
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
TPolyMarker & operator=(const TPolyMarker &)
assignment operator
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
if object in a list can be deleted
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Copy(TObject &object) const
Copy this to obj.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
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 Int_t SetNextPoint(Double_t x, Double_t y)
Set point following LastPoint to x, y.
virtual void Paint(Option_t *option="")
Paint.
virtual void SetPolyMarker(Int_t n)
If n <= 0 the current arrays of points are deleted.
virtual void ls(Option_t *option="") const
ls.
virtual void Modify()
Change current marker attributes if necessary.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Collection abstract base class.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
virtual void SetPoint(Int_t point, Double_t x, Double_t y)
Set point number n.
virtual void Print(Option_t *option="") const
Print polymarker.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
A PolyMarker is defined by an array on N points in a 2-D space.
Mother of all ROOT objects.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a polymarker.
virtual void Copy(TObject &polymarker) const
Copy this to obj.
Short_t Max(Short_t a, Short_t b)
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0