// @(#)root/hist:$Id$
// Author: Rene Brun   12/12/94

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TPolyMarker
#define ROOT_TPolyMarker


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPolyMarker                                                          //
//                                                                      //
// An array of points with the same marker.                             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TAttMarker
#include "TAttMarker.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

class TCollection;

class TPolyMarker : public TObject, public TAttMarker {
protected:
   Int_t       fN;            //number of points
   Int_t       fLastPoint;    //The index of the last filled point
   Double_t   *fX;            //[fN] Array of X coordinates
   Double_t   *fY;            //[fN] Array of Y coordinates
   TString     fOption;       //options

   TPolyMarker& operator=(const TPolyMarker&);

public:
   TPolyMarker();
   TPolyMarker(Int_t n, Option_t *option="");
   TPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
   TPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
   TPolyMarker(const TPolyMarker &polymarker);
   virtual ~TPolyMarker();
   virtual void     Copy(TObject &polymarker) const;
   virtual Int_t    DistancetoPrimitive(Int_t px, Int_t py);
   virtual void     Draw(Option_t *option="");
   virtual void     DrawPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
   virtual void     ExecuteEvent(Int_t event, Int_t px, Int_t py);
   virtual Int_t    GetLastPoint() const { return fLastPoint;}
   virtual Int_t    GetN() const {return fN;}
   Option_t        *GetOption() const {return fOption.Data();}
   Double_t        *GetX() const {return fX;}
   Double_t        *GetY() const {return fY;}
   virtual void     ls(Option_t *option="") const;
   virtual Int_t    Merge(TCollection *list);
   virtual void     Paint(Option_t *option="");
   virtual void     PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
   virtual void     Print(Option_t *option="") const;
   virtual void     SavePrimitive(std::ostream &out, Option_t *option = "");
   virtual Int_t    SetNextPoint(Double_t x, Double_t y); // *MENU*
   virtual void     SetPoint(Int_t point, Double_t x, Double_t y); // *MENU*
   virtual void     SetPolyMarker(Int_t n);
   virtual void     SetPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
   virtual void     SetPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
   virtual Int_t    Size() const {return fLastPoint+1;}

   ClassDef(TPolyMarker,4)  //An array of points with the same marker
};

#endif
 TPolyMarker.h:1
 TPolyMarker.h:2
 TPolyMarker.h:3
 TPolyMarker.h:4
 TPolyMarker.h:5
 TPolyMarker.h:6
 TPolyMarker.h:7
 TPolyMarker.h:8
 TPolyMarker.h:9
 TPolyMarker.h:10
 TPolyMarker.h:11
 TPolyMarker.h:12
 TPolyMarker.h:13
 TPolyMarker.h:14
 TPolyMarker.h:15
 TPolyMarker.h:16
 TPolyMarker.h:17
 TPolyMarker.h:18
 TPolyMarker.h:19
 TPolyMarker.h:20
 TPolyMarker.h:21
 TPolyMarker.h:22
 TPolyMarker.h:23
 TPolyMarker.h:24
 TPolyMarker.h:25
 TPolyMarker.h:26
 TPolyMarker.h:27
 TPolyMarker.h:28
 TPolyMarker.h:29
 TPolyMarker.h:30
 TPolyMarker.h:31
 TPolyMarker.h:32
 TPolyMarker.h:33
 TPolyMarker.h:34
 TPolyMarker.h:35
 TPolyMarker.h:36
 TPolyMarker.h:37
 TPolyMarker.h:38
 TPolyMarker.h:39
 TPolyMarker.h:40
 TPolyMarker.h:41
 TPolyMarker.h:42
 TPolyMarker.h:43
 TPolyMarker.h:44
 TPolyMarker.h:45
 TPolyMarker.h:46
 TPolyMarker.h:47
 TPolyMarker.h:48
 TPolyMarker.h:49
 TPolyMarker.h:50
 TPolyMarker.h:51
 TPolyMarker.h:52
 TPolyMarker.h:53
 TPolyMarker.h:54
 TPolyMarker.h:55
 TPolyMarker.h:56
 TPolyMarker.h:57
 TPolyMarker.h:58
 TPolyMarker.h:59
 TPolyMarker.h:60
 TPolyMarker.h:61
 TPolyMarker.h:62
 TPolyMarker.h:63
 TPolyMarker.h:64
 TPolyMarker.h:65
 TPolyMarker.h:66
 TPolyMarker.h:67
 TPolyMarker.h:68
 TPolyMarker.h:69
 TPolyMarker.h:70
 TPolyMarker.h:71
 TPolyMarker.h:72
 TPolyMarker.h:73
 TPolyMarker.h:74
 TPolyMarker.h:75
 TPolyMarker.h:76
 TPolyMarker.h:77
 TPolyMarker.h:78
 TPolyMarker.h:79
 TPolyMarker.h:80