Implement TVirtualPadPainter which abstracts painting operations.
TWebPadPainter tries to support old Paint methods of the ROOT classes. Main classes (like histograms or graphs) should be painted on JavaScript side
Definition at line 26 of file TWebPadPainter.h.
Public Member Functions | |
TWebPadPainter () | |
void | ClearDrawable () override |
void | CopyDrawable (Int_t, Int_t, Int_t) override |
Int_t | CreateDrawable (UInt_t, UInt_t) override |
void | DestroyDrawable (Int_t) override |
void | DrawBox (Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode) override |
Paint a simple box. | |
void | DrawFillArea (Int_t n, const Double_t *x, const Double_t *y) override |
Paint filled area. | |
void | DrawFillArea (Int_t n, const Float_t *x, const Float_t *y) override |
Paint filled area. | |
void | DrawLine (Double_t x1, Double_t y1, Double_t x2, Double_t y2) override |
Paint a simple line. | |
void | DrawLineNDC (Double_t u1, Double_t v1, Double_t u2, Double_t v2) override |
Paint a simple line in normalized coordinates. | |
void | DrawPixels (const unsigned char *pixelData, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY, Bool_t enableAlphaBlending) override |
Noop, for non-gl pad TASImage calls gVirtualX->CopyArea. | |
void | DrawPolyLine (Int_t n, const Double_t *x, const Double_t *y) override |
Paint Polyline. | |
void | DrawPolyLine (Int_t n, const Float_t *x, const Float_t *y) override |
Paint polyline. | |
void | DrawPolyLineNDC (Int_t n, const Double_t *u, const Double_t *v) override |
Paint polyline in normalized coordinates. | |
void | DrawPolyMarker (Int_t n, const Double_t *x, const Double_t *y) override |
Paint polymarker. | |
void | DrawPolyMarker (Int_t n, const Float_t *x, const Float_t *y) override |
Paint polymarker. | |
void | DrawText (Double_t x, Double_t y, const char *text, ETextMode mode) override |
Paint text. | |
void | DrawText (Double_t x, Double_t y, const wchar_t *text, ETextMode mode) override |
Special version working with wchar_t and required by TMathText. | |
void | DrawTextNDC (Double_t u, Double_t v, const char *text, ETextMode mode) override |
Paint text in normalized coordinates. | |
void | DrawTextNDC (Double_t u, Double_t v, const wchar_t *text, ETextMode mode) override |
Paint text in normalized coordinates. | |
Color_t | GetFillColor () const override |
Style_t | GetFillStyle () const override |
Color_t | GetLineColor () const override |
Style_t | GetLineStyle () const override |
Width_t | GetLineWidth () const override |
Short_t | GetTextAlign () const override |
Float_t | GetTextAngle () const override |
Color_t | GetTextColor () const override |
Font_t | GetTextFont () const override |
Float_t | GetTextMagnitude () const override |
Float_t | GetTextSize () const override |
TClass * | IsA () const override |
Bool_t | IsTransparent () const override |
void | SaveImage (TVirtualPad *, const char *, Int_t) const override |
Produce image from WebPadPainter. | |
void | SelectDrawable (Int_t) override |
void | SetFillColor (Color_t fcolor) override |
void | SetFillStyle (Style_t fstyle) override |
void | SetLineColor (Color_t lcolor) override |
void | SetLineStyle (Style_t lstyle) override |
void | SetLineWidth (Width_t lwidth) override |
void | SetOpacity (Int_t percent) override |
void | SetPainting (TWebPainting *p) |
void | SetTextAlign (Short_t align) override |
void | SetTextAngle (Float_t tangle) override |
void | SetTextColor (Color_t tcolor) override |
void | SetTextFont (Font_t tfont) override |
void | SetTextSize (Float_t tsize) override |
void | SetTextSizePixels (Int_t npixels) override |
void | Streamer (TBuffer &) override |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TVirtualPadPainter | |
virtual | ~TVirtualPadPainter () |
Virtual dtor. | |
virtual void | InitPainter () |
Empty definition. | |
virtual void | InvalidateCS () |
Empty definition. | |
virtual void | LockPainter () |
Empty definition. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TAttLine | |
TAttLine () | |
AttLine default constructor. | |
TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth) | |
AttLine normal constructor. | |
virtual | ~TAttLine () |
AttLine destructor. | |
void | Copy (TAttLine &attline) const |
Copy this line attributes to a new TAttLine. | |
Int_t | DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2) |
Compute distance from point px,py to a line. | |
virtual void | Modify () |
Change current line attributes if necessary. | |
virtual void | ResetAttLine (Option_t *option="") |
Reset this line attributes to default values. | |
virtual void | SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1) |
Save line attributes as C++ statement(s) on output stream out. | |
virtual void | SetLineAttributes () |
Invoke the DialogCanvas Line attributes. | |
virtual void | SetLineColorAlpha (Color_t lcolor, Float_t lalpha) |
Set a transparent line color. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TAttFill | |
TAttFill () | |
AttFill default constructor. | |
TAttFill (Color_t fcolor, Style_t fstyle) | |
AttFill normal constructor. | |
virtual | ~TAttFill () |
AttFill destructor. | |
void | Copy (TAttFill &attfill) const |
Copy this fill attributes to a new TAttFill. | |
virtual void | Modify () |
Change current fill area attributes if necessary. | |
virtual void | ResetAttFill (Option_t *option="") |
Reset this fill attributes to default values. | |
virtual void | SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001) |
Save fill attributes as C++ statement(s) on output stream out. | |
virtual void | SetFillAttributes () |
Invoke the DialogCanvas Fill attributes. | |
virtual void | SetFillColorAlpha (Color_t fcolor, Float_t falpha) |
Set a transparent fill color. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TAttText | |
TAttText () | |
AttText default constructor. | |
TAttText (Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize) | |
AttText normal constructor. | |
virtual | ~TAttText () |
AttText destructor. | |
void | Copy (TAttText &atttext) const |
Copy this text attributes to a new TAttText. | |
virtual Float_t | GetTextSizePercent (Float_t size) |
Return the text in percent of the pad size. | |
virtual void | Modify () |
Change current text attributes if necessary. | |
virtual void | ResetAttText (Option_t *toption="") |
Reset this text attributes to default values. | |
virtual void | SaveTextAttributes (std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1) |
Save text attributes as C++ statement(s) on output stream out. | |
virtual void | SetTextAttributes () |
Invoke the DialogCanvas Text attributes. | |
virtual void | SetTextColorAlpha (Color_t tcolor, Float_t talpha) |
Set a transparent marker color. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TAttMarker | |
TAttMarker () | |
TAttMarker default constructor. | |
TAttMarker (Color_t color, Style_t style, Size_t msize) | |
TAttMarker normal constructor. | |
virtual | ~TAttMarker () |
TAttMarker destructor. | |
void | Copy (TAttMarker &attmarker) const |
Copy this marker attributes to a new TAttMarker. | |
virtual Color_t | GetMarkerColor () const |
Return the marker color. | |
virtual Size_t | GetMarkerSize () const |
Return the marker size. | |
virtual Style_t | GetMarkerStyle () const |
Return the marker style. | |
virtual void | Modify () |
Change current marker attributes if necessary. | |
virtual void | ResetAttMarker (Option_t *toption="") |
Reset this marker attributes to the default values. | |
virtual void | SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1) |
Save line attributes as C++ statement(s) on output stream out. | |
virtual void | SetMarkerAttributes () |
Invoke the DialogCanvas Marker attributes. | |
virtual void | SetMarkerColor (Color_t mcolor=1) |
Set the marker color. | |
virtual void | SetMarkerColorAlpha (Color_t mcolor, Float_t malpha) |
Set a transparent marker color. | |
virtual void | SetMarkerSize (Size_t msize=1) |
Set the marker size. | |
virtual void | SetMarkerStyle (Style_t mstyle=1) |
Set the marker style. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TVirtualPadPainter | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static TVirtualPadPainter * | PadPainter (Option_t *opt="") |
Create a pad painter of specified type. | |
Static Public Member Functions inherited from TAttLine | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TAttFill | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TAttText | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TAttMarker | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Width_t | GetMarkerLineWidth (Style_t style) |
Internal helper function that returns the line width of the given marker style (0 = filled marker) | |
static Style_t | GetMarkerStyleBase (Style_t style) |
Internal helper function that returns the corresponding marker style with line width 1 for the given style. | |
Protected Types | |
enum | { attrLine = 0x1 , attrFill = 0x2 , attrMarker = 0x4 , attrText = 0x8 , attrAll = 0xf } |
!< object to store all painting, owned by TWebPS object More... | |
Protected Member Functions | |
Float_t * | StoreOperation (const std::string &oper, unsigned attrkind, int opersize=0) |
Store operation identifier with appropriate attributes. | |
Protected Attributes | |
TWebPainting * | fPainting {nullptr} |
Protected Attributes inherited from TAttLine | |
Color_t | fLineColor |
Line color. | |
Style_t | fLineStyle |
Line style. | |
Width_t | fLineWidth |
Line width. | |
Protected Attributes inherited from TAttFill | |
Color_t | fFillColor |
Fill area color. | |
Style_t | fFillStyle |
Fill area style. | |
Protected Attributes inherited from TAttText | |
Short_t | fTextAlign |
Text alignment. | |
Float_t | fTextAngle |
Text angle. | |
Color_t | fTextColor |
Text color. | |
Font_t | fTextFont |
Text font. | |
Float_t | fTextSize |
Text size. | |
Protected Attributes inherited from TAttMarker | |
Color_t | fMarkerColor |
Marker color. | |
Size_t | fMarkerSize |
Marker size. | |
Style_t | fMarkerStyle |
Marker style. | |
Private Member Functions | |
TWebPadPainter (const TWebPadPainter &rhs)=delete | |
TWebPadPainter (TWebPadPainter &&rhs)=delete | |
TWebPadPainter & | operator= (const TWebPadPainter &rhs)=delete |
TWebPadPainter & | operator= (TWebPadPainter &&rhs)=delete |
Friends | |
class | TWebCanvas |
Additional Inherited Members | |
Public Types inherited from TVirtualPadPainter | |
enum | EBoxMode { kHollow , kFilled } |
enum | ETextMode { kClear , kOpaque } |
#include <TWebPadPainter.h>
|
protected |
!< object to store all painting, owned by TWebPS object
Enumerator | |
---|---|
attrLine | |
attrFill | |
attrMarker | |
attrText | |
attrAll |
Definition at line 34 of file TWebPadPainter.h.
|
inline |
Definition at line 40 of file TWebPadPainter.h.
|
privatedelete |
|
privatedelete |
|
static |
|
inlinestaticconstexpr |
Definition at line 122 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 81 of file TWebPadPainter.h.
Implements TVirtualPadPainter.
Definition at line 82 of file TWebPadPainter.h.
Implements TVirtualPadPainter.
Definition at line 80 of file TWebPadPainter.h.
|
inlinestatic |
Definition at line 122 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 83 of file TWebPadPainter.h.
|
overridevirtual |
Paint a simple box.
Implements TVirtualPadPainter.
Definition at line 102 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint filled area.
Implements TVirtualPadPainter.
Definition at line 124 of file TWebPadPainter.cxx.
Paint filled area.
Implements TVirtualPadPainter.
Definition at line 140 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint a simple line.
Implements TVirtualPadPainter.
Definition at line 65 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint a simple line in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 83 of file TWebPadPainter.cxx.
|
overridevirtual |
Noop, for non-gl pad TASImage calls gVirtualX->CopyArea.
Implements TVirtualPadPainter.
Definition at line 55 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint polyline in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 188 of file TWebPadPainter.cxx.
|
overridevirtual |
Special version working with wchar_t and required by TMathText.
Implements TVirtualPadPainter.
Definition at line 252 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint text in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 264 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint text in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 279 of file TWebPadPainter.cxx.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 56 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 57 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 47 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 48 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 49 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 65 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 66 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 67 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 68 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 70 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 69 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Reimplemented from TVirtualPadPainter.
Definition at line 122 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 58 of file TWebPadPainter.h.
|
privatedelete |
|
privatedelete |
|
overridevirtual |
Produce image from WebPadPainter.
Implements TVirtualPadPainter.
Definition at line 294 of file TWebPadPainter.cxx.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 84 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 60 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 61 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 51 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 52 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 53 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 62 of file TWebPadPainter.h.
|
inline |
Definition at line 42 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 72 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 73 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 74 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 75 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 76 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 77 of file TWebPadPainter.h.
|
protected |
Store operation identifier with appropriate attributes.
Definition at line 31 of file TWebPadPainter.cxx.
|
overridevirtual |
Reimplemented from TVirtualPadPainter.
|
inline |
Definition at line 122 of file TWebPadPainter.h.
|
friend |
Definition at line 28 of file TWebPadPainter.h.
|
protected |
Definition at line 32 of file TWebPadPainter.h.