Implement TVirtualPadPainter which abstracts painting operations.
Definition at line 25 of file TPadPainter.h.
Public Types | |
| enum | EBoxMode { kHollow , kFilled } |
| enum | ESaveImageResult { kSaveNotImplemented , kSaveFail , kSaveOk } |
| enum | ETextMode { kClear , kOpaque } |
Public Member Functions | |
| TPadPainter () | |
| Empty ctor. We need it only because of explicit copy ctor. | |
| void | ClearDrawable () override |
| Clear the current gVirtualX window - calling gVirtualX->ClearWindowW. | |
| void | ClearWindow (Int_t device) override |
| Clear specified window - calling gVirtualX->ClearWindowW. | |
| void | CopyDrawable (Int_t device, Int_t px, Int_t py) override |
| Copy a gVirtualX pixmap. | |
| Int_t | CreateDrawable (UInt_t w, UInt_t h) override |
| Create a gVirtualX Pixmap. | |
| void | DestroyDrawable (Int_t device) override |
| Close the current gVirtualX pixmap. | |
| 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 | DrawImage (TImage *img, Int_t x, Int_t y, Int_t flags=0) override |
| Draw image on the gVirtualX window. | |
| 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 | DrawSegments (Int_t n, Double_t *x, Double_t *y) override |
| Paint N segments on the pad. | |
| void | DrawSegmentsNDC (Int_t n, Double_t *u, Double_t *v) override |
| Paint N segments in normalized coordinates on the pad. | |
| 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 |
| Paint wtext. | |
| void | DrawTextNDC (Double_t u, Double_t v, const char *text, ETextMode mode) override |
| Paint text at NDC coordinates. | |
| void | DrawTextNDC (Double_t u, Double_t v, const wchar_t *text, ETextMode mode) override |
| Paint wtext at NDC coordinates. | |
| virtual void | DrawTextUrl (Double_t x, Double_t y, const char *text, const char *url) |
| Draw text with url link By default only text is drawn. | |
| void | DrawTTFglyphs (Int_t x, Int_t y, TTFhandle &ttf, ETextMode mode) override |
| Paint TTF glyps on virtualx device. | |
| Bool_t | FillImageFromPad (TImage *image, TVirtualPad *pad) const override |
| Fill image object with the pixel data from the pad Implements special handling for X11 where ASImage has native implementation. | |
| const TAttFill & | GetAttFill () const override |
| Get fill attributes. | |
| 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 |
| virtual TVirtualPS * | GetPS () const |
| 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 |
| Delegate to gVirtualX. | |
| Float_t | GetTextSize () const override |
| Bool_t | HasTTFonts () const override |
| Return true if TTF font can be used. | |
| virtual void | InitPainter () |
| Empty definition. | |
| virtual void | InvalidateCS () |
| Empty definition. | |
| TClass * | IsA () const override |
| Bool_t | IsCocoa () const override |
| Returns true when cocoa backend is used. | |
| Bool_t | IsNative () const override |
| Bool_t | IsSupportAlpha () const override |
| Returns true if transparent colors are supported. | |
| Bool_t | IsTransparent () const override |
| Bool_t | IsX11 () const override |
| Returns true when X11 backend is used. | |
| virtual void | LockPainter () |
| Empty definition. | |
| virtual void | NewPage () |
| void | OnPad (TVirtualPad *pad) override |
| virtual void | R__DEPRECATED (7, 00, "Old method, replaced by SaveAsImage") SaveImage(TVirtualPad *pad |
| Int_t | ResizeDrawable (Int_t device, UInt_t w, UInt_t h) override |
| Resize a gVirtualX Pixmap. | |
| ESaveImageResult | SaveAsImage (TVirtualPad *pad, const char *fileName, Int_t type) const override |
| Save the image displayed in the canvas pointed by "pad" into a binary file. | |
| void | SelectDrawable (Int_t device) override |
| Select the window in which the graphics will go. | |
| 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 | SetDoubleBuffer (Int_t device, Int_t mode) override |
| Set double buffer mode for specified device. | |
| void | SetDrawMode (Int_t device, Int_t mode) override |
| Set drawing mode for specified device. | |
| 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 | SetOpacity (Int_t percent) override |
| Delegate to gVirtualX. | |
| 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) |
| void | UpdateDrawable (Int_t mode) override |
| Call low-level update of selected drawable, redirect to gVirtualX. | |
Static Public Member Functions | |
| 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. | |
Public Attributes | |
| virtual void const char Int_t type | const |
| virtual void const char * | fileName |
Protected Member Functions | |
| TAttFill | GetAttFillInternal (Bool_t with_transparency) |
| Returns fill attributes after modification Checks for special fill styles 4000 . | |
| virtual Double_t | GetTTFScale () const |
Protected Attributes | |
| TAttFill | fAttFill |
| current fill attributes | |
| TAttLine | fAttLine |
| current line attributes | |
| TAttMarker | fAttMarker |
| current marker attributes | |
| TAttText | fAttText |
| current text attributes | |
| Int_t | fDoubleBuffer = 1 |
| Bool_t | fFullyTransparent = kFALSE |
| if transformed fill attributes fully transparent | |
| TVirtualPad * | fPad = nullptr |
| WinContext_t | fWinContext = (WinContext_t) 0 |
Private Member Functions | |
| TPadPainter (const TPadPainter &)=delete | |
| TPadPainter (TPadPainter &&)=delete | |
| TPadPainter & | operator= (const TPadPainter &)=delete |
| TPadPainter & | operator= (TPadPainter &&)=delete |
#include <TPadPainter.h>
|
inherited |
| Enumerator | |
|---|---|
| kHollow | |
| kFilled | |
Definition at line 28 of file TVirtualPadPainter.h.
|
inherited |
| Enumerator | |
|---|---|
| kSaveNotImplemented | |
| kSaveFail | |
| kSaveOk | |
Definition at line 41 of file TVirtualPadPainter.h.
|
inherited |
| Enumerator | |
|---|---|
| kClear | |
| kOpaque | |
Definition at line 29 of file TVirtualPadPainter.h.
| TPadPainter::TPadPainter | ( | ) |
Empty ctor. We need it only because of explicit copy ctor.
Definition at line 72 of file TPadPainter.cxx.
|
privatedelete |
|
privatedelete |
|
static |
|
inlinestaticconstexpr |
Definition at line 100 of file TPadPainter.h.
|
overridevirtual |
Clear the current gVirtualX window - calling gVirtualX->ClearWindowW.
Implements TVirtualPadPainter.
Definition at line 145 of file TPadPainter.cxx.
|
overridevirtual |
Clear specified window - calling gVirtualX->ClearWindowW.
Reimplemented from TVirtualPadPainter.
Definition at line 154 of file TPadPainter.cxx.
Copy a gVirtualX pixmap.
Implements TVirtualPadPainter.
Definition at line 164 of file TPadPainter.cxx.
Create a gVirtualX Pixmap.
Implements TVirtualPadPainter.
Definition at line 105 of file TPadPainter.cxx.
|
inlinestatic |
Definition at line 100 of file TPadPainter.h.
|
overridevirtual |
Close the current gVirtualX pixmap.
Implements TVirtualPadPainter.
Definition at line 172 of file TPadPainter.cxx.
Draw image on the gVirtualX window.
Reimplemented from TVirtualPadPainter.
Definition at line 227 of file TPadPainter.cxx.
|
overridevirtual |
Paint a simple line in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 312 of file TPadPainter.cxx.
|
overridevirtual |
Noop, for non-gl pad TASImage calls gVirtualX->CopyArea.
Implements TVirtualPadPainter.
Definition at line 237 of file TPadPainter.cxx.
|
overridevirtual |
Paint polyline in normalized coordinates.
Implements TVirtualPadPainter.
Definition at line 416 of file TPadPainter.cxx.
Paint N segments on the pad.
Reimplemented from TVirtualPadPainter.
Definition at line 439 of file TPadPainter.cxx.
Paint N segments in normalized coordinates on the pad.
Reimplemented from TVirtualPadPainter.
Definition at line 470 of file TPadPainter.cxx.
|
overridevirtualinherited |
Paint text.
Implements TVirtualPadPainter.
Reimplemented in TPadPainterPS, and TWebPadPainter.
Definition at line 173 of file TPadPainterBase.cxx.
|
overridevirtualinherited |
Paint wtext.
Implements TVirtualPadPainter.
Reimplemented in TPadPainterPS, and TWebPadPainter.
Definition at line 197 of file TPadPainterBase.cxx.
|
overridevirtualinherited |
Paint text at NDC coordinates.
Implements TVirtualPadPainter.
Reimplemented in TPadPainterPS, and TWebPadPainter.
Definition at line 221 of file TPadPainterBase.cxx.
|
overridevirtualinherited |
Paint wtext at NDC coordinates.
Implements TVirtualPadPainter.
Reimplemented in TPadPainterPS, and TWebPadPainter.
Definition at line 245 of file TPadPainterBase.cxx.
|
virtualinherited |
Draw text with url link By default only text is drawn.
Reimplemented in TPadPainterPS, and TWebPadPainter.
Definition at line 99 of file TVirtualPadPainter.cxx.
|
overridevirtual |
Paint TTF glyps on virtualx device.
Reimplemented from TPadPainterBase.
Definition at line 529 of file TPadPainter.cxx.
|
overridevirtual |
Fill image object with the pixel data from the pad Implements special handling for X11 where ASImage has native implementation.
Reimplemented from TVirtualPadPainter.
Definition at line 578 of file TPadPainter.cxx.
Get fill attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 88 of file TPadPainterBase.h.
Returns fill attributes after modification Checks for special fill styles 4000 .
. 4100
Definition at line 34 of file TPadPainterBase.cxx.
Get line attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 89 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Get marker attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 90 of file TPadPainterBase.h.
Get text attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 91 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 52 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 53 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
old methods only for backward compatibility
Implements TVirtualPadPainter.
Definition at line 43 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 44 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 45 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Reimplemented from TVirtualPadPainter.
Definition at line 75 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Reimplemented from TVirtualPadPainter.
Definition at line 77 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Reimplemented from TVirtualPadPainter.
Definition at line 76 of file TPadPainterBase.h.
|
inlinevirtualinherited |
Reimplemented in TPadPainterPS.
Definition at line 170 of file TVirtualPadPainter.h.
|
overridevirtualinherited |
Returns text advance.
Reimplemented from TVirtualPadPainter.
Definition at line 143 of file TPadPainterBase.cxx.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 60 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 61 of file TPadPainterBase.h.
|
overridevirtualinherited |
Returns text accent / descent.
Reimplemented from TVirtualPadPainter.
Definition at line 90 of file TPadPainterBase.cxx.
|
overridevirtualinherited |
Returns text accent / descent.
Reimplemented from TVirtualPadPainter.
Definition at line 116 of file TPadPainterBase.cxx.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 62 of file TPadPainterBase.h.
|
overridevirtualinherited |
Returns text extend.
Reimplemented from TVirtualPadPainter.
Definition at line 54 of file TPadPainterBase.cxx.
|
overridevirtualinherited |
Returns text extend.
Reimplemented from TVirtualPadPainter.
Definition at line 72 of file TPadPainterBase.cxx.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 63 of file TPadPainterBase.h.
|
overridevirtual |
Delegate to gVirtualX.
Implements TVirtualPadPainter.
Definition at line 97 of file TPadPainter.cxx.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 64 of file TPadPainterBase.h.
|
inlineprotectedvirtualinherited |
Reimplemented in TGLPadPainter.
Definition at line 35 of file TPadPainterBase.h.
|
overridevirtual |
Return true if TTF font can be used.
Reimplemented from TVirtualPadPainter.
Definition at line 219 of file TPadPainter.cxx.
|
virtualinherited |
Empty definition.
Reimplemented in TGLPadPainter.
Definition at line 40 of file TVirtualPadPainter.cxx.
|
virtualinherited |
Empty definition.
Reimplemented in TGLPadPainter.
Definition at line 47 of file TVirtualPadPainter.cxx.
|
inlineoverridevirtual |
Reimplemented from TVirtualPadPainter.
Definition at line 100 of file TPadPainter.h.
|
overridevirtual |
Returns true when cocoa backend is used.
Reimplemented from TVirtualPadPainter.
Definition at line 129 of file TPadPainter.cxx.
|
inlineoverridevirtual |
Reimplemented from TVirtualPadPainter.
Definition at line 88 of file TPadPainter.h.
|
overridevirtual |
Returns true if transparent colors are supported.
Reimplemented from TVirtualPadPainter.
Definition at line 137 of file TPadPainter.cxx.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 54 of file TPadPainterBase.h.
|
overridevirtual |
Returns true when X11 backend is used.
Reimplemented from TVirtualPadPainter.
Definition at line 121 of file TPadPainter.cxx.
|
virtualinherited |
Empty definition.
Reimplemented in TGLPadPainter.
Definition at line 54 of file TVirtualPadPainter.cxx.
|
inlinevirtualinherited |
Reimplemented in TPadPainterPS.
Definition at line 119 of file TVirtualPadPainter.h.
|
inlineoverridevirtualinherited |
Reimplemented from TVirtualPadPainter.
Reimplemented in TPadPainterPS.
Definition at line 85 of file TPadPainterBase.h.
|
privatedelete |
|
privatedelete |
|
staticinherited |
Create a pad painter of specified type.
Definition at line 61 of file TVirtualPadPainter.cxx.
|
virtualinherited |
Resize a gVirtualX Pixmap.
Reimplemented from TVirtualPadPainter.
Definition at line 113 of file TPadPainter.cxx.
|
overridevirtual |
Save the image displayed in the canvas pointed by "pad" into a binary file.
Reimplemented from TVirtualPadPainter.
Definition at line 554 of file TPadPainter.cxx.
|
overridevirtual |
Select the window in which the graphics will go.
Implements TVirtualPadPainter.
Definition at line 182 of file TPadPainter.cxx.
Set fill attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 245 of file TPadPainter.cxx.
Set line attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 257 of file TPadPainter.cxx.
|
overridevirtual |
Set marker attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 267 of file TPadPainter.cxx.
Set text attributes.
Reimplemented from TVirtualPadPainter.
Definition at line 277 of file TPadPainter.cxx.
Set double buffer mode for specified device.
Reimplemented from TVirtualPadPainter.
Definition at line 207 of file TPadPainter.cxx.
Set drawing mode for specified device.
Reimplemented from TVirtualPadPainter.
Definition at line 199 of file TPadPainter.cxx.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 56 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 57 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 47 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 48 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 49 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Reimplemented from TVirtualPadPainter.
Definition at line 79 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Reimplemented from TVirtualPadPainter.
Definition at line 81 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Reimplemented from TVirtualPadPainter.
Definition at line 80 of file TPadPainterBase.h.
|
overridevirtual |
Delegate to gVirtualX.
Implements TVirtualPadPainter.
Definition at line 89 of file TPadPainter.cxx.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 67 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 68 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 69 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 70 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 71 of file TPadPainterBase.h.
|
inlineoverridevirtualinherited |
Implements TVirtualPadPainter.
Definition at line 72 of file TPadPainterBase.h.
|
overridevirtual |
Reimplemented from TVirtualPadPainter.
|
inline |
Definition at line 100 of file TPadPainter.h.
|
overridevirtual |
Call low-level update of selected drawable, redirect to gVirtualX.
Reimplemented from TVirtualPadPainter.
Definition at line 191 of file TPadPainter.cxx.
Definition at line 159 of file TVirtualPadPainter.h.
|
protectedinherited |
current fill attributes
Definition at line 28 of file TPadPainterBase.h.
|
protectedinherited |
current line attributes
Definition at line 29 of file TPadPainterBase.h.
|
protectedinherited |
current marker attributes
Definition at line 30 of file TPadPainterBase.h.
|
protectedinherited |
current text attributes
Definition at line 31 of file TPadPainterBase.h.
|
protected |
Definition at line 27 of file TPadPainter.h.
if transformed fill attributes fully transparent
Definition at line 32 of file TPadPainterBase.h.
|
inherited |
Definition at line 159 of file TVirtualPadPainter.h.
|
protectedinherited |
Definition at line 26 of file TPadPainterBase.h.
|
protectedinherited |
Definition at line 25 of file TPadPainterBase.h.