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 22 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. | |
| void | DrawTextUrl (Double_t x, Double_t y, const char *text, const char *url) override |
| Paint text with url. | |
| Bool_t | HasTTFonts () const override |
| Return true if TTF font can be used. | |
| TClass * | IsA () const override |
| Bool_t | IsSupportAlpha () const override |
| void | SaveImage (TVirtualPad *, const char *, Int_t) const override |
| Produce image from WebPadPainter. | |
| void | SelectDrawable (Int_t) override |
| void | SetOpacity (Int_t percent) override |
| Set opacity - similar to TVirtualPS usecase. | |
| void | SetPainting (TWebPainting *p) |
| void | Streamer (TBuffer &) override |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TPadPainterBase | |
| const TAttFill & | GetAttFill () const override |
| const TAttLine & | GetAttLine () const override |
| Get line attributes. | |
| const TAttMarker & | GetAttMarker () const override |
| Get marker attributes. | |
| const TAttText & | GetAttText () const override |
| Get text attributes. | |
| 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 |
| Color_t | GetMarkerColor () const override |
| Size_t | GetMarkerSize () const override |
| Style_t | GetMarkerStyle () const override |
| UInt_t | GetTextAdvance (Font_t font, Double_t size, const char *text, Bool_t kern) override |
| Returns text advance. | |
| Short_t | GetTextAlign () const override |
| Float_t | GetTextAngle () const override |
| void | GetTextAscentDescent (Font_t font, Double_t size, UInt_t &a, UInt_t &d, const char *mess) override |
| Returns text accent / descent. | |
| void | GetTextAscentDescent (Font_t font, Double_t size, UInt_t &a, UInt_t &d, const wchar_t *mess) override |
| Returns text accent / descent. | |
| Color_t | GetTextColor () const override |
| void | GetTextExtent (Font_t font, Double_t size, UInt_t &w, UInt_t &h, const char *mess) override |
| Returns text extend. | |
| void | GetTextExtent (Font_t font, Double_t size, UInt_t &w, UInt_t &h, const wchar_t *mess) override |
| Returns text extend. | |
| Font_t | GetTextFont () const override |
| Float_t | GetTextMagnitude () const override |
| Float_t | GetTextSize () const override |
| Bool_t | IsTransparent () const override |
| void | SetAttFill (const TAttFill &att) override |
| Set fill attributes. | |
| void | SetAttLine (const TAttLine &att) override |
| Set line attributes. | |
| void | SetAttMarker (const TAttMarker &att) override |
| Set marker attributes. | |
| void | SetAttText (const TAttText &att) override |
| Set text attributes. | |
| 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 | SetMarkerColor (Color_t mcolor) override |
| void | SetMarkerSize (Size_t msize) override |
| void | SetMarkerStyle (Style_t mstyle) override |
| 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 | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TVirtualPadPainter | |
| virtual | ~TVirtualPadPainter () |
| Virtual dtor. | |
| virtual void | ClearWindow (Int_t) |
| virtual void | DrawSegments (Int_t n, Double_t *x, Double_t *y) |
| Draw N segments on the pad Exclude segments where both points match. | |
| virtual void | DrawSegmentsNDC (Int_t n, Double_t *u, Double_t *v) |
| Draw N segments in NDC coordinates on the pad Exclude segments where both points match. | |
| virtual TVirtualPS * | GetPS () const |
| virtual void | InitPainter () |
| Empty definition. | |
| virtual void | InvalidateCS () |
| Empty definition. | |
| virtual Bool_t | IsCocoa () const |
| virtual Bool_t | IsNative () const |
| virtual void | LockPainter () |
| Empty definition. | |
| virtual void | NewPage () |
| virtual void | OnPad (TVirtualPad *) |
| virtual Int_t | ResizeDrawable (Int_t, UInt_t, UInt_t) |
| virtual void | SetCursor (Int_t win, ECursor cursor) |
| Set cursor for specified device, redirect to gVirtualX. | |
| virtual void | SetDoubleBuffer (Int_t device, Int_t mode) |
| Set double buffer mode for specified device, redirect to gVirtualX. | |
| virtual void | SetDrawMode (Int_t, Int_t) |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| virtual void | UpdateDrawable (Int_t) |
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 TPadPainterBase | |
| 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. | |
Protected Types | |
| enum | { attrLine = 0x1 , attrFill = 0x2 , attrMarker = 0x4 , attrText = 0x8 , attrAll = 0xf } |
Protected Member Functions | |
| Float_t * | StoreOperation (const std::string &oper, unsigned attrkind, int opersize=0) |
| Store operation identifier with appropriate attributes. | |
Protected Member Functions inherited from TPadPainterBase | |
| TAttFill | GetAttFillInternal (Bool_t with_transparency) |
| Returns fill attributes after modification Checks for special fill styles 4000 . | |
Protected Attributes | |
| TWebPainting * | fPainting {nullptr} |
| ! object to store all painting, owned by TWebPS object | |
Protected Attributes inherited from TPadPainterBase | |
| TAttFill | fAttFill |
| current fill attributes | |
| TAttLine | fAttLine |
| current line attributes | |
| TAttMarker | fAttMarker |
| current marker attributes | |
| TAttText | fAttText |
| current text attributes | |
| Bool_t | fFullyTransparent = kFALSE |
| if transformed fill attributes fully transparent | |
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 |
| Enumerator | |
|---|---|
| attrLine | |
| attrFill | |
| attrMarker | |
| attrText | |
| attrAll | |
Definition at line 30 of file TWebPadPainter.h.
|
inline |
Definition at line 36 of file TWebPadPainter.h.
|
privatedelete |
|
privatedelete |
|
static |
|
inlinestaticconstexpr |
Definition at line 91 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 46 of file TWebPadPainter.h.
Implements TVirtualPadPainter.
Definition at line 47 of file TWebPadPainter.h.
Implements TVirtualPadPainter.
Definition at line 45 of file TWebPadPainter.h.
|
inlinestatic |
Definition at line 91 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 48 of file TWebPadPainter.h.
|
overridevirtual |
Paint a simple box.
Implements TVirtualPadPainter.
Definition at line 111 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint filled area.
Implements TVirtualPadPainter.
Definition at line 134 of file TWebPadPainter.cxx.
Paint filled area.
Implements TVirtualPadPainter.
Definition at line 150 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint a simple line.
Implements TVirtualPadPainter.
Definition at line 73 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint a simple line in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 91 of file TWebPadPainter.cxx.
|
overridevirtual |
Noop, for non-gl pad TASImage calls gVirtualX->CopyArea.
Implements TVirtualPadPainter.
Definition at line 63 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint polyline in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 198 of file TWebPadPainter.cxx.
|
overridevirtual |
Special version working with wchar_t and required by TMathText.
Implements TVirtualPadPainter.
Definition at line 277 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint text in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 291 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint text in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 306 of file TWebPadPainter.cxx.
|
overridevirtual |
Paint text with url.
Reimplemented from TVirtualPadPainter.
Definition at line 262 of file TWebPadPainter.cxx.
|
inlineoverridevirtual |
Return true if TTF font can be used.
Reimplemented from TVirtualPadPainter.
Definition at line 40 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Reimplemented from TPadPainterBase.
Definition at line 91 of file TWebPadPainter.h.
|
inlineoverridevirtual |
Reimplemented from TVirtualPadPainter.
Definition at line 82 of file TWebPadPainter.h.
|
privatedelete |
|
privatedelete |
|
overridevirtual |
Produce image from WebPadPainter.
Implements TVirtualPadPainter.
Definition at line 322 of file TWebPadPainter.cxx.
|
inlineoverridevirtual |
Implements TVirtualPadPainter.
Definition at line 49 of file TWebPadPainter.h.
|
overridevirtual |
Set opacity - similar to TVirtualPS usecase.
Implements TVirtualPadPainter.
Definition at line 30 of file TWebPadPainter.cxx.
|
inline |
Definition at line 38 of file TWebPadPainter.h.
|
protected |
Store operation identifier with appropriate attributes.
Definition at line 38 of file TWebPadPainter.cxx.
|
overridevirtual |
Reimplemented from TPadPainterBase.
|
inline |
Definition at line 91 of file TWebPadPainter.h.
|
friend |
Definition at line 24 of file TWebPadPainter.h.
|
protected |
! object to store all painting, owned by TWebPS object
Definition at line 28 of file TWebPadPainter.h.