Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TEveRGBAPaletteOverlay.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Alja Mrak Tadel 2012
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TEveRGBAPaletteOverlay
13 #define ROOT_TEveRGBAPaletteOverlay
14 
15 #include "TAxis.h"
16 #include "TGLOverlay.h"
17 #include "TGLAxisPainter.h"
18 
19 class TEveRGBAPalette;
20 
21 class TEveRGBAPaletteOverlay : public TGLOverlayElement
22 {
23 private:
24  TEveRGBAPaletteOverlay(const TEveRGBAPaletteOverlay&); // Not implemented
25  TEveRGBAPaletteOverlay& operator=(const TEveRGBAPaletteOverlay&); // Not implemented
26 
27 protected:
28  TEveRGBAPalette *fPalette;
29  TAxis fAxis;
30  TGLAxisPainter fAxisPainter;
31 
32  Float_t fPosX; // x position
33  Float_t fPosY; // y position
34  Float_t fWidth; // width
35  Float_t fHeight; // height
36 
37 public:
38  TEveRGBAPaletteOverlay(TEveRGBAPalette* p, Float_t posx, Float_t posy,
39  Float_t width, Float_t height);
40  virtual ~TEveRGBAPaletteOverlay() {}
41 
42  virtual void Render(TGLRnrCtx& rnrCtx);
43 
44  TAxis& RefAxis() { return fAxis; }
45  TGLAxisPainter& RefAxisPainter() { return fAxisPainter; }
46 
47 
48  void SetPosition(Float_t x, Float_t y) { fPosX = x; fPosY = y; }
49  void SetSize(Float_t w, Float_t h) { fWidth = w; fHeight = h; }
50 
51  ClassDef(TEveRGBAPaletteOverlay, 0); // Draws TEveRGBAPalette as GL overlay.
52 };
53 
54 #endif