00001 #ifndef ROOT_TGLPadPainter
00002 #define ROOT_TGLPadPainter
00003 
00004 #ifndef ROOT_TVirtualPadPainter
00005 #include "TVirtualPadPainter.h"
00006 #endif
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 class TVirtualPad;
00016 
00017 class TPadPainter : public TVirtualPadPainter {
00018 public:
00019    TPadPainter();
00020    
00021    
00022    
00023    Color_t  GetLineColor() const;
00024    Style_t  GetLineStyle() const;
00025    Width_t  GetLineWidth() const;
00026    
00027    void     SetLineColor(Color_t lcolor);
00028    void     SetLineStyle(Style_t lstyle);
00029    void     SetLineWidth(Width_t lwidth);
00030    
00031    Color_t  GetFillColor() const;
00032    Style_t  GetFillStyle() const;
00033    Bool_t   IsTransparent() const;
00034 
00035    void     SetFillColor(Color_t fcolor);
00036    void     SetFillStyle(Style_t fstyle);
00037    void     SetOpacity(Int_t percent);
00038    
00039    Short_t  GetTextAlign() const;
00040    Float_t  GetTextAngle() const;
00041    Color_t  GetTextColor() const;
00042    Font_t   GetTextFont()  const;
00043    Float_t  GetTextSize()  const;
00044    Float_t  GetTextMagnitude() const;
00045    
00046    void     SetTextAlign(Short_t align);
00047    void     SetTextAngle(Float_t tangle);
00048    void     SetTextColor(Color_t tcolor);
00049    void     SetTextFont(Font_t tfont);
00050    void     SetTextSize(Float_t tsize);
00051    void     SetTextSizePixels(Int_t npixels);
00052    
00053    Int_t    CreateDrawable(UInt_t w, UInt_t h);
00054    void     ClearDrawable();
00055    void     CopyDrawable(Int_t id, Int_t px, Int_t py);
00056    void     DestroyDrawable();
00057    void     SelectDrawable(Int_t device);
00058 
00059    void     DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
00060    void     DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2);
00061    
00062    void     DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode);
00063    
00064    void     DrawFillArea(Int_t n, const Double_t *x, const Double_t *y);
00065    void     DrawFillArea(Int_t n, const Float_t *x, const Float_t *y);
00066    
00067    
00068    void     DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y);
00069    void     DrawPolyLine(Int_t n, const Float_t *x, const Float_t *y);
00070    void     DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v);
00071    
00072    
00073    void     DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y);
00074    void     DrawPolyMarker(Int_t n, const Float_t *x, const Float_t *y);
00075    
00076    void     DrawText(Double_t x, Double_t y, const char *text, ETextMode mode);
00077    void     DrawTextNDC(Double_t u, Double_t v, const char *text, ETextMode mode);
00078    
00079    
00080    void     SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const;
00081 
00082 private:
00083    TPadPainter(const TPadPainter &rhs);
00084    TPadPainter & operator = (const TPadPainter &rhs);
00085    
00086    ClassDef(TPadPainter, 0) 
00087 };
00088 
00089 #endif