#ifndef ROOT_TSpectrum2Painter
#define ROOT_TSpectrum2Painter
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
class TH2;
class TLine;
class TColor;
class TSpectrum2Painter: public TNamed {
public:
TSpectrum2Painter(TH2* h2, Int_t bs);
virtual ~TSpectrum2Painter();
void GetAngles(Int_t &alpha,Int_t &beta,Int_t &view);
void GetBezier(Int_t &bezier);
void GetChanGrid(Int_t &enable,Int_t &color);
void GetChanMarks(Int_t &enable,Int_t &color,Int_t &width,Int_t &height,Int_t &style);
void GetColorAlgorithm(Int_t &colorAlgorithm);
void GetColorIncrements(Double_t &r,Double_t &g,Double_t &b);
void GetContourWidth(Int_t &width);
void GetDisplayMode(Int_t &modeGroup,Int_t &displayMode);
void GetLightHeightWeight(Double_t &weight);
void GetLightPosition(Int_t &x,Int_t &y,Int_t &z);
void GetNodes(Int_t &nodesx,Int_t &nodesy);
void GetPenAttr(Int_t &color, Int_t &style, Int_t &width);
void GetShading(Int_t &shading,Int_t &shadow);
void GetZScale(Int_t &scale);
void Paint(Option_t *option);
void SetAngles(Int_t alpha,Int_t beta,Int_t view);
void SetBezier(Int_t bezier);
void SetChanGrid(Int_t enable,Int_t color);
void SetChanMarks(Int_t enable,Int_t color,Int_t width,Int_t height,Int_t style);
void SetColorAlgorithm(Int_t colorAlgorithm);
void SetColorIncrements(Double_t r,Double_t g,Double_t b);
void SetContourWidth(Int_t width);
void SetDisplayMode(Int_t modeGroup,Int_t displayMode);
void SetLightHeightWeight(Double_t weight);
void SetLightPosition(Int_t x,Int_t y,Int_t z);
void SetNodes(Int_t nodesx,Int_t nodesy);
void SetPenAttr(Int_t color,Int_t style,Int_t width);
void SetShading(Int_t shading,Int_t shadow);
void SetZScale(Int_t scale);
static void PaintSpectrum(TH2* h2, Option_t *option="",Int_t bs=1600);
enum {
kModeGroupSimple=0,
kModeGroupHeight=1,
kModeGroupLight=2,
kModeGroupLightHeight=3,
kDisplayModePoints=1,
kDisplayModeGrid=2,
kDisplayModeContours=3,
kDisplayModeBars=4,
kDisplayModeLinesX=5,
kDisplayModeLinesY=6,
kDisplayModeBarsX=7,
kDisplayModeBarsY=8,
kDisplayModeNeedles=9,
kDisplayModeSurface=10,
kDisplayModeTriangles=11,
kZScaleLinear=0,
kZScaleLog=1,
kZScaleSqrt=2,
kColorAlgRgbSmooth=0,
kColorAlgRgbModulo=1,
kColorAlgCmySmooth=2,
kColorAlgCmyModulo=3,
kColorAlgCieSmooth=4,
kColorAlgCieModulo=5,
kColorAlgYiqSmooth=6,
kColorAlgYiqModulo=7,
kColorAlgHvsSmooth=8,
kColorAlgHvsModulo=9,
kShadowsNotPainted=0,
kShadowsPainted=1,
kNotShaded=0,
kShaded=1,
kNoBezierInterpol=0,
kBezierInterpol=1,
kPenStyleSolid=1,
kPenStyleDash=2,
kPenStyleDot=3,
kPenStyleDashDot=4,
kChannelMarksNotDrawn=0,
kChannelMarksDrawn=1,
kChannelMarksStyleDot=1,
kChannelMarksStyleCross=2,
kChannelMarksStyleStar=3,
kChannelMarksStyleRectangle=4,
kChannelMarksStyleX=5,
kChannelMarksStyleDiamond=6,
kChannelMarksStyleTriangle=7,
kChannelGridNotDrawn=0,
kChannelGridDrawn=1
};
protected:
TH2 *fH2;
Int_t fXmin;
Int_t fXmax;
Int_t fYmin;
Int_t fYmax;
Double_t fZmin;
Double_t fZmax;
Int_t fBx1;
Int_t fBx2;
Int_t fBy1;
Int_t fBy2;
Int_t fPenColor;
Int_t fPenDash;
Int_t fPenWidth;
Int_t fModeGroup;
Int_t fDisplayMode;
Int_t fZscale;
Int_t fNodesx;
Int_t fNodesy;
Int_t fContWidth;
Int_t fAlpha;
Int_t fBeta;
Int_t fViewAngle;
Int_t fLevels;
Double_t fRainbow1Step;
Double_t fRainbow2Step;
Double_t fRainbow3Step;
Int_t fColorAlg;
Double_t fLHweight;
Int_t fXlight;
Int_t fYlight;
Int_t fZlight;
Int_t fShadow;
Int_t fShading;
Int_t fBezier;
Int_t fChanmarkEnDis;
Int_t fChanmarkStyle;
Int_t fChanmarkWidth;
Int_t fChanmarkHeight;
Int_t fChanmarkColor;
Int_t fChanlineEnDis;
Int_t fChanlineColor;
Double_t fKx;
Double_t fKy;
Double_t fMxx;
Double_t fMxy;
Double_t fMyx;
Double_t fMyy;
Double_t fTxx;
Double_t fTxy;
Double_t fTyx;
Double_t fTyy;
Double_t fTyz;
Double_t fVx;
Double_t fVy;
Double_t fNuSli;
Double_t fZ,fZeq,fGbezx,fGbezy,fDxspline,fDyspline,fZPresetValue;
Int_t fXt,fYt,fXs,fYs,fXe,fYe,fLine;
Short_t *fEnvelope;
Short_t *fEnvelopeContour;
TColor *fNewColor;
Int_t fMaximumXScreenResolution;
Int_t fNewColorIndex;
Int_t fBzX[4];
Int_t fBzY[4];
Int_t BezC(Int_t i);
Double_t BezierBlend(Int_t i,Double_t bezf);
void BezierSmoothing(Double_t bezf);
Double_t ColorCalculation(Double_t dx1,Double_t dy1,Double_t z1,Double_t dx2,Double_t dy2,Double_t z2,Double_t dx3,Double_t dy3,Double_t z3);
void ColorModel(unsigned ui,unsigned ui1,unsigned ui2,unsigned ui3);
void CopyEnvelope(Double_t xr,Double_t xs,Double_t yr,Double_t ys);
void DrawMarker(Int_t x,Int_t y,Int_t w,Int_t h,Int_t type);
void Envelope(Int_t x1,Int_t y1,Int_t x2,Int_t y2);
void EnvelopeBars(Int_t x1,Int_t y1,Int_t x2,Int_t y2);
Double_t ShadowColorCalculation(Double_t xtaz,Double_t ytaz,Double_t ztaz,Double_t shad_noise);
void Slice(Double_t xr,Double_t yr,Double_t xs,Double_t ys,TLine *line);
void Transform(Int_t it,Int_t jt,Int_t zmt);
public:
ClassDef(TSpectrum2Painter,0)
private:
TSpectrum2Painter (const TSpectrum2Painter&);
TSpectrum2Painter& operator=(const TSpectrum2Painter&);
};
#endif