12 #ifndef ROOT_TGLPadPainter
13 #define ROOT_TGLPadPainter
22 class TLinearGradient;
23 class TRadialGradient;
28 class TGLPadPainter :
public TVirtualPadPainter {
30 Rgl::Pad::PolygonStippleSet fSSet;
31 Rgl::Pad::Tesselator fTess;
32 Rgl::Pad::MarkerPainter fMarker;
33 Rgl::Pad::GLLimits fLimits;
35 std::vector<Double_t> fVs;
42 std::vector<TPoint> fPoly;
47 template<
class Char_t>
48 void DrawTextHelper(Double_t x, Double_t y,
const Char_t *text, ETextMode mode);
55 Color_t GetLineColor()
const;
56 Style_t GetLineStyle()
const;
57 Width_t GetLineWidth()
const;
59 void SetLineColor(Color_t lcolor);
60 void SetLineStyle(Style_t lstyle);
61 void SetLineWidth(Width_t lwidth);
63 Color_t GetFillColor()
const;
64 Style_t GetFillStyle()
const;
65 Bool_t IsTransparent()
const;
67 void SetFillColor(Color_t fcolor);
68 void SetFillStyle(Style_t fstyle);
69 void SetOpacity(Int_t percent);
71 Short_t GetTextAlign()
const;
72 Float_t GetTextAngle()
const;
73 Color_t GetTextColor()
const;
74 Font_t GetTextFont()
const;
75 Float_t GetTextSize()
const;
76 Float_t GetTextMagnitude()
const;
78 void SetTextAlign(Short_t align);
79 void SetTextAngle(Float_t tangle);
80 void SetTextColor(Color_t tcolor);
81 void SetTextFont(Font_t tfont);
82 void SetTextSize(Float_t tsize);
83 void SetTextSizePixels(Int_t npixels);
86 Int_t CreateDrawable(UInt_t w, UInt_t h);
88 void CopyDrawable(Int_t device, Int_t px, Int_t py);
89 void DestroyDrawable(Int_t device);
90 void SelectDrawable(Int_t device);
96 void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
97 void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2);
99 void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode);
101 void DrawFillArea(Int_t n,
const Double_t *x,
const Double_t *y);
102 void DrawFillArea(Int_t n,
const Float_t *x,
const Float_t *y);
105 void DrawPolyLine(Int_t n,
const Double_t *x,
const Double_t *y);
106 void DrawPolyLine(Int_t n,
const Float_t *x,
const Float_t *y);
107 void DrawPolyLineNDC(Int_t n,
const Double_t *u,
const Double_t *v);
110 void DrawPolyMarker(Int_t n,
const Double_t *x,
const Double_t *y);
111 void DrawPolyMarker(Int_t n,
const Float_t *x,
const Float_t *y);
113 void DrawText(Double_t x, Double_t y,
const char *text, ETextMode mode);
114 void DrawText(Double_t, Double_t,
const wchar_t *, ETextMode);
115 void DrawTextNDC(Double_t x, Double_t y,
const char *text, ETextMode mode);
116 void DrawTextNDC(Double_t, Double_t,
const wchar_t *, ETextMode);
119 void SaveImage(TVirtualPad *pad,
const char *fileName, Int_t type)
const;
122 void DrawPixels(
const unsigned char *pixelData, UInt_t width, UInt_t height,
123 Int_t dstX, Int_t dstY, Bool_t enableBlending);
130 void SaveProjectionMatrix()
const;
131 void RestoreProjectionMatrix()
const;
135 void SaveModelviewMatrix()
const;
136 void RestoreModelviewMatrix()
const;
139 void RestoreViewport();
141 void DrawPolyMarker();
144 void DrawPolygonWithGradient(Int_t n,
const Double_t *x,
const Double_t *y);
146 void DrawGradient(
const TLinearGradient *gradient, Int_t n,
const Double_t *x,
const Double_t *y);
147 void DrawGradient(
const TRadialGradient *gradient, Int_t n,
const Double_t *x,
const Double_t *y);
149 void DrawTesselation(Int_t n,
const Double_t *x,
const Double_t *y);
151 TGLPadPainter(
const TGLPadPainter &rhs);
152 TGLPadPainter & operator = (
const TGLPadPainter &rhs);
154 ClassDef(TGLPadPainter, 0)