Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TVirtualPS.h
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Rene Brun 05/09/99
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11#ifndef ROOT_TVirtualPS
12#define ROOT_TVirtualPS
13
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TVirtualPS //
18// //
19// Abstract interface to a PostScript driver. //
20// //
21//////////////////////////////////////////////////////////////////////////
22
23
24#include "TNamed.h"
25#include "TAttLine.h"
26#include "TAttFill.h"
27#include "TAttText.h"
28#include "TAttMarker.h"
29
30class TVirtualPS : public TNamed, public TAttLine, public TAttFill, public TAttMarker, public TAttText {
31
32private:
33 TVirtualPS(const TVirtualPS&) = delete;
34 TVirtualPS& operator=(const TVirtualPS&) = delete;
35
36protected:
37 Int_t fNByte{0}; // Number of bytes written in the file (PDF)
38 Int_t fLenBuffer{0}; // Buffer length
39 Int_t fSizBuffer{0}; // Buffer size
40 Bool_t fPrinted{kFALSE}; // True when a page must be printed
41 std::ofstream *fStream{nullptr}; // File stream identifier
42 char *fBuffer{nullptr}; // File buffer
43 const char *fImplicitCREsc{nullptr}; // Escape symbol before enforced new line
44
45public:
46 TVirtualPS();
47 TVirtualPS(const char *filename, Int_t type=-111);
48 virtual ~TVirtualPS();
50 virtual void CellArrayFill(Int_t r, Int_t g, Int_t b) = 0;
51 virtual void CellArrayEnd() = 0;
52 virtual void Close(Option_t *opt="") = 0;
54 virtual void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt,
55 Int_t mode, Int_t border, Int_t dark, Int_t light) = 0;
56 virtual void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) = 0;
57 virtual void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y) = 0;
58 virtual void DrawPS(Int_t n, Float_t *xw, Float_t *yw) = 0;
59 virtual void DrawPS(Int_t n, Double_t *xw, Double_t *yw) = 0;
60 virtual void NewPage() = 0;
61 virtual void Open(const char *filename, Int_t type=-111) = 0;
62 virtual void Text(Double_t x, Double_t y, const char *string) = 0;
63 virtual void Text(Double_t x, Double_t y, const wchar_t *string) = 0;
64 virtual void SetColor(Float_t r, Float_t g, Float_t b) = 0;
65
66 virtual void PrintFast(Int_t nch, const char *string="");
67 virtual void PrintStr(const char *string="");
68 virtual void WriteInteger(Int_t i, Bool_t space=kTRUE);
69 virtual void WriteReal(Float_t r, Bool_t space=kTRUE);
70 virtual void PrintRaw(Int_t len, const char *str);
71 virtual void *GetStream() const { return (void*)fStream; }
72 virtual void SetStream(std::ofstream *os) { fStream = os; }
73
74 virtual void SetType(Int_t /*type*/ = -111) { }
75 virtual Int_t GetType() const { return 111; }
76
77 ClassDefOverride(TVirtualPS,0) //Abstract interface to a PostScript driver
78};
79
80
82
83#endif
#define R__EXTERN
Definition DllImport.h:26
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
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 mode
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char y1
R__EXTERN TVirtualPS * gVirtualPS
Definition TVirtualPS.h:81
Fill Area Attributes class.
Definition TAttFill.h:19
Line Attributes class.
Definition TAttLine.h:18
Marker Attributes class.
Definition TAttMarker.h:19
Text Attributes class.
Definition TAttText.h:18
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
Definition TVirtualPS.h:30
virtual void SetStream(std::ofstream *os)
Definition TVirtualPS.h:72
virtual void DrawPS(Int_t n, Double_t *xw, Double_t *yw)=0
Int_t fSizBuffer
Definition TVirtualPS.h:39
virtual void Text(Double_t x, Double_t y, const char *string)=0
Int_t fLenBuffer
Definition TVirtualPS.h:38
virtual void SetColor(Float_t r, Float_t g, Float_t b)=0
virtual void NewPage()=0
TVirtualPS & operator=(const TVirtualPS &)=delete
virtual void WriteInteger(Int_t i, Bool_t space=kTRUE)
Write one Integer to the file.
virtual void PrintRaw(Int_t len, const char *str)
Print a raw.
virtual Int_t GetType() const
Definition TVirtualPS.h:75
virtual void DrawPS(Int_t n, Float_t *xw, Float_t *yw)=0
virtual void PrintStr(const char *string="")
Output the string str in the output buffer.
virtual void PrintFast(Int_t nch, const char *string="")
Fast version of Print.
virtual void CellArrayEnd()=0
virtual void CellArrayFill(Int_t r, Int_t g, Int_t b)=0
virtual void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)=0
std::ofstream * fStream
Definition TVirtualPS.h:41
char * fBuffer
Definition TVirtualPS.h:42
virtual void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2)=0
virtual void * GetStream() const
Definition TVirtualPS.h:71
TVirtualPS()
VirtualPS default constructor.
Int_t fNByte
Definition TVirtualPS.h:37
virtual void Text(Double_t x, Double_t y, const wchar_t *string)=0
virtual void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)=0
virtual void SetType(Int_t=-111)
Definition TVirtualPS.h:74
virtual void Close(Option_t *opt="")=0
virtual void Open(const char *filename, Int_t type=-111)=0
TVirtualPS(const TVirtualPS &)=delete
const char * fImplicitCREsc
Definition TVirtualPS.h:43
virtual void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y)=0
virtual ~TVirtualPS()
VirtualPS destructor.
virtual void WriteReal(Float_t r, Bool_t space=kTRUE)
Write a Real number to the file.
Bool_t fPrinted
Definition TVirtualPS.h:40
virtual void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light)=0
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
#define H(x, y, z)