Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-15 09:12:25

0001 // @(#)root/base:$Id$
0002 // Author: Rene Brun   12/05/95
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TAttMarker
0013 #define ROOT_TAttMarker
0014 
0015 
0016 #include "Rtypes.h"
0017 
0018 class TColorNumber;
0019 
0020 class TAttMarker {
0021 
0022 protected:
0023    Color_t    fMarkerColor;       ///< Marker color
0024    Style_t    fMarkerStyle;       ///< Marker style
0025    Size_t     fMarkerSize;        ///< Marker size
0026 
0027 public:
0028    TAttMarker();
0029    TAttMarker(Color_t color, Style_t style, Size_t msize);
0030    virtual ~TAttMarker();
0031            void     Copy(TAttMarker &attmarker) const;
0032    virtual Color_t  GetMarkerColor() const {return fMarkerColor;} ///< Return the marker color
0033    virtual Style_t  GetMarkerStyle() const {return fMarkerStyle;} ///< Return the marker style
0034    virtual Size_t   GetMarkerSize()  const {return fMarkerSize;}  ///< Return the marker size
0035    virtual void     Modify();
0036    virtual void     ResetAttMarker(Option_t *toption="");
0037    virtual void     SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1);
0038    virtual void     SetMarkerAttributes();  // *MENU*
0039    virtual void     SetMarkerColor(Color_t mcolor=1) { fMarkerColor = mcolor;} ///< Set the marker color
0040    virtual void     SetMarkerColorAlpha(Color_t mcolor, Float_t malpha);
0041    virtual void     SetMarkerStyle(Style_t mstyle=1) { fMarkerStyle = mstyle;} ///< Set the marker style
0042    /// Set the marker size.
0043    /// Note that the marker styles number 1 6 and 7 (the dots), cannot be scaled.
0044    /// They are meant to be very fast to draw and are always drawn with the same number of pixels;
0045    /// therefore this method does not apply on them.
0046    virtual void     SetMarkerSize(Size_t msize=1)    { fMarkerSize  = msize;}
0047 
0048    static Style_t GetMarkerStyleBase(Style_t style);
0049    static Width_t GetMarkerLineWidth(Style_t style);
0050 
0051    void SetMarkerColor(TColorNumber lcolor);
0052 
0053    ClassDef(TAttMarker,3);  //Marker attributes
0054 };
0055 
0056    enum EMarkerStyle {kDot=1, kPlus, kStar, kCircle=4, kMultiply=5,
0057                       kFullDotSmall=6, kFullDotMedium=7, kFullDotLarge=8,
0058                       kFullCircle=20, kFullSquare=21, kFullTriangleUp=22,
0059                       kFullTriangleDown=23, kOpenCircle=24, kOpenSquare=25,
0060                       kOpenTriangleUp=26, kOpenDiamond=27, kOpenCross=28,
0061                       kFullStar=29, kOpenStar=30, kOpenTriangleDown=32,
0062                       kFullDiamond=33, kFullCross=34, kOpenDiamondCross=35,
0063                       kOpenSquareDiagonal=36, kOpenThreeTriangles=37,
0064                       kOctagonCross=38, kFullThreeTriangles=39,
0065                       kOpenFourTrianglesX=40, kFullFourTrianglesX=41,
0066                       kOpenDoubleDiamond=42, kFullDoubleDiamond=43,
0067                       kOpenFourTrianglesPlus=44, kFullFourTrianglesPlus=45,
0068                       kOpenCrossX=46, kFullCrossX=47, kFourSquaresX=48,
0069                       kFourSquaresPlus=49 };
0070 
0071 #endif
0072