79 for (
Int_t i=0; i<
fN;i++) {
fX[i] = x[i];
fY[i] = y[i]; }
101 if (!x || !y)
return;
102 for (
Int_t i=0; i<
fN;i++) {
fX[i] = x[i];
fY[i] = y[i]; }
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;
184 Int_t i, pxp, pyp, d;
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);
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 out<<
" pmarker->Draw(" 330 <<quote<<option<<quote<<
");"<<std::endl;
352 if (!
fX || !
fY || n >=
fN) {
359 memset(&savex[
fN],0,(newN-fN)*
sizeof(
Double_t));
364 memset(&savey[
fN],0,(newN-fN)*
sizeof(
Double_t));
406 if (
fX)
delete []
fX;
407 if (
fY)
delete []
fY;
432 if (
fX)
delete []
fX;
433 if (
fY)
delete []
fY;
447 void TPolyMarker::Streamer(
TBuffer &R__b)
457 TObject::Streamer(R__b);
458 TAttMarker::Streamer(R__b);
464 for (i=0;i<
fN;i++) {R__b >> xold;
fX[i] = xold;}
465 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()
Destructor.
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.
Binding & operator=(OUT(*fun)(void))
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