Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TWebPS.h
Go to the documentation of this file.
1// Author: Sergey Linev, GSI 23/10/2018
2
3/*************************************************************************
4 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_TWebPS
12#define ROOT_TWebPS
13
14#include "TVirtualPS.h"
15
16#include "TWebPainting.h"
17
18#include <memory>
19#include <string>
20
21class TWebPS : public TVirtualPS {
22
23 std::unique_ptr<TWebPainting> fPainting; ///!< object to store all painting
24
25 enum EAttrKinds { attrLine = 0x1, attrFill = 0x2, attrMarker = 0x4, attrText = 0x8 };
26
27 Float_t *StoreOperation(const std::string &oper, unsigned attrkind, int opersize = 0);
28
29public:
30 TWebPS();
31
32 Bool_t IsEmptyPainting() const { return fPainting ? fPainting->IsEmpty() : kTRUE; }
33 TWebPainting *GetPainting() { return fPainting.get(); }
35 {
37 return fPainting.release();
38 }
39 void CreatePainting();
40
41 /// not yet implemented
42
44 void CellArrayFill(Int_t, Int_t, Int_t) override {}
45 void CellArrayEnd() override {}
46 void Close(Option_t * = "") override {}
48 void NewPage() override {}
49 void Open(const char *, Int_t = -111) override {}
50 void SetColor(Float_t, Float_t, Float_t) override {}
51
52 // overwritten methods
54 void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) override;
55 void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y) override;
56 void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override;
57 void DrawPS(Int_t n, Double_t *xw, Double_t *yw) override;
58 void Text(Double_t x, Double_t y, const char *str) override;
59 void Text(Double_t x, Double_t y, const wchar_t *str) override;
60
61private:
62 //Let's make this clear:
63 TWebPS(const TWebPS &rhs) = delete;
64 TWebPS(TWebPS && rhs) = delete;
65 TWebPS & operator = (const TWebPS &rhs) = delete;
66 TWebPS & operator = (TWebPS && rhs) = delete;
67
68 ClassDefOverride(TWebPS, 0) // Redirection of VirtualPS to Web painter
69};
70
71#endif
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint DrawPolyMarker
Option_t Option_t TPoint TPoint const char y1
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
Definition TVirtualPS.h:30
TWebPS(const TWebPS &rhs)=delete
TWebPS & operator=(const TWebPS &rhs)=delete
void DrawFrame(Double_t, Double_t, Double_t, Double_t, Int_t, Int_t, Int_t, Int_t) override
Definition TWebPS.h:47
void CellArrayEnd() override
Definition TWebPS.h:45
void CreatePainting()
Definition TWebPS.cxx:26
void SetColor(Float_t, Float_t, Float_t) override
Definition TWebPS.h:50
void CellArrayFill(Int_t, Int_t, Int_t) override
Definition TWebPS.h:44
void Open(const char *, Int_t=-111) override
Definition TWebPS.h:49
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Definition TWebPS.cxx:51
void Close(Option_t *="") override
Definition TWebPS.h:46
Float_t * StoreOperation(const std::string &oper, unsigned attrkind, int opersize=0)
Definition TWebPS.cxx:32
Bool_t IsEmptyPainting() const
Definition TWebPS.h:32
std::unique_ptr< TWebPainting > fPainting
Definition TWebPS.h:23
TWebPainting * TakePainting()
Definition TWebPS.h:34
TWebPainting * GetPainting()
Definition TWebPS.h:33
TWebPS(TWebPS &&rhs)=delete
void CellArrayBegin(Int_t, Int_t, Double_t, Double_t, Double_t, Double_t) override
not yet implemented
Definition TWebPS.h:43
void NewPage() override
Definition TWebPS.h:48
EAttrKinds
!< object to store all painting
Definition TWebPS.h:25
@ attrFill
Definition TWebPS.h:25
@ attrMarker
Definition TWebPS.h:25
@ attrLine
Definition TWebPS.h:25
@ attrText
Definition TWebPS.h:25
TWebPS()
Definition TWebPS.cxx:21
void Text(Double_t x, Double_t y, const char *str) override
Definition TWebPS.cxx:119
void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override
Definition TWebPS.cxx:85
Object used to store paint operations and deliver them to JSROOT.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16