Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEveRGBAPaletteOverlay.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/eve:$Id$
0002 // Author: Alja Mrak Tadel 2012
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, 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_TEveRGBAPaletteOverlay
0013 #define ROOT_TEveRGBAPaletteOverlay
0014 
0015 #include "TAxis.h"
0016 #include "TGLOverlay.h"
0017 #include "TGLAxisPainter.h"
0018 
0019 class TEveRGBAPalette;
0020 
0021 class TEveRGBAPaletteOverlay : public TGLOverlayElement
0022 {
0023 private:
0024    TEveRGBAPaletteOverlay(const TEveRGBAPaletteOverlay&);            // Not implemented
0025    TEveRGBAPaletteOverlay& operator=(const TEveRGBAPaletteOverlay&); // Not implemented
0026 
0027 protected:
0028    TEveRGBAPalette *fPalette;
0029    TAxis            fAxis;
0030    TGLAxisPainter   fAxisPainter;
0031 
0032    Float_t          fPosX;         // x position
0033    Float_t          fPosY;         // y position
0034    Float_t          fWidth;        // width
0035    Float_t          fHeight;       // height
0036 
0037 public:
0038    TEveRGBAPaletteOverlay(TEveRGBAPalette* p, Float_t posx, Float_t posy,
0039                           Float_t width, Float_t height);
0040    ~TEveRGBAPaletteOverlay() override {}
0041 
0042    void Render(TGLRnrCtx& rnrCtx) override;
0043 
0044    TAxis&           RefAxis() { return fAxis; }
0045    TGLAxisPainter&  RefAxisPainter() { return fAxisPainter; }
0046 
0047 
0048    void SetPosition(Float_t x, Float_t y) { fPosX = x; fPosY = y; }
0049    void SetSize(Float_t w, Float_t h) { fWidth = w; fHeight = h; }
0050 
0051    ClassDefOverride(TEveRGBAPaletteOverlay, 0); // Draws TEveRGBAPalette as GL overlay.
0052 };
0053 
0054 #endif