File indexing completed on 2026-09-15 09:25:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TPadPainter
0013 #define ROOT_TPadPainter
0014
0015 #include "TPadPainterBase.h"
0016
0017
0018
0019
0020
0021
0022
0023 class TVirtualPad;
0024
0025 class TPadPainter : public TPadPainterBase {
0026 WinContext_t fWinContext;
0027 Int_t fDoubleBuffer;
0028
0029 public:
0030 TPadPainter();
0031
0032 void SetOpacity(Int_t percent) override;
0033 Float_t GetTextMagnitude() const override;
0034
0035
0036 void SetAttFill(const TAttFill &att) override;
0037 void SetAttLine(const TAttLine &att) override;
0038 void SetAttMarker(const TAttMarker &att) override;
0039 void SetAttText(const TAttText &att) override;
0040
0041
0042 Int_t CreateDrawable(UInt_t w, UInt_t h) override;
0043 void ClearDrawable() override;
0044 void ClearWindow(Int_t device) override;
0045 Int_t ResizeDrawable(Int_t device, UInt_t w, UInt_t h) override;
0046 void CopyDrawable(Int_t device, Int_t px, Int_t py) override;
0047 void DestroyDrawable(Int_t device) override;
0048 void SelectDrawable(Int_t device) override;
0049 void UpdateDrawable(Int_t mode) override;
0050 void SetDrawMode(Int_t device, Int_t mode) override;
0051 void SetDoubleBuffer(Int_t device, Int_t mode) override;
0052
0053
0054
0055 void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t height,
0056 Int_t dstX, Int_t dstY, Bool_t enableAlphaBlending) override;
0057
0058 void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override;
0059 void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) override;
0060
0061 void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode) override;
0062
0063
0064 void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y) override;
0065 void DrawFillArea(Int_t n, const Float_t *x, const Float_t *y) override;
0066
0067
0068 void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y) override;
0069 void DrawPolyLine(Int_t n, const Float_t *x, const Float_t *y) override;
0070 void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v) override;
0071
0072 void DrawSegments(Int_t n, Double_t *x, Double_t *y) override;
0073 void DrawSegmentsNDC(Int_t n, Double_t *u, Double_t *v) override;
0074
0075
0076 void DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y) override;
0077 void DrawPolyMarker(Int_t n, const Float_t *x, const Float_t *y) override;
0078
0079 void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode) override;
0080 void DrawText(Double_t x, Double_t y, const wchar_t *text, ETextMode mode) override;
0081 void DrawTextNDC(Double_t u, Double_t v, const char *text, ETextMode mode) override;
0082 void DrawTextNDC(Double_t u, Double_t v, const wchar_t *text, ETextMode mode) override;
0083
0084
0085 void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const override;
0086
0087 Bool_t IsNative() const override { return kTRUE; }
0088
0089 Bool_t IsCocoa() const override;
0090
0091 Bool_t IsSupportAlpha() const override;
0092
0093 private:
0094
0095 TPadPainter(const TPadPainter &) = delete;
0096 TPadPainter(TPadPainter &&) = delete;
0097 TPadPainter &operator=(const TPadPainter &) = delete;
0098 TPadPainter &operator=(TPadPainter &&) = delete;
0099
0100 ClassDefOverride(TPadPainter, 0)
0101 };
0102
0103 #endif