Data structure for size of TCanvas.
More...
#include <JCanvas.hh>
|
| int | x |
| | number of pixels in X
|
| |
| int | y |
| | number of pixels in Y
|
| |
|
| std::istream & | operator>> (std::istream &in, JCanvas &cv) |
| | Read canvas from input stream.
|
| |
| std::ostream & | operator<< (std::ostream &out, const JCanvas &cv) |
| | Write canvas to output stream.
|
| |
Data structure for size of TCanvas.
Definition at line 21 of file JCanvas.hh.
◆ JCanvas() [1/2]
| JROOT::JCanvas::JCanvas |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 29 of file JCanvas.hh.
29 :
32 {}
int y
number of pixels in Y
int x
number of pixels in X
◆ JCanvas() [2/2]
| JROOT::JCanvas::JCanvas |
( |
const int | x, |
|
|
const int | y ) |
|
inline |
Constructor.
- Parameters
-
Definition at line 41 of file JCanvas.hh.
◆ operator>>
| std::istream & operator>> |
( |
std::istream & | in, |
|
|
JCanvas & | cv ) |
|
friend |
Read canvas from input stream.
- Parameters
-
- Returns
- input stream
Definition at line 55 of file JCanvas.hh.
56 {
58
59 string buffer;
60
62
64
65 if (pos != string::npos) {
66
67 if (!(istringstream(buffer.substr(0,pos)) >> cv.x)) { in.setstate(ios::badbit); }
68 if (!(istringstream(buffer.substr(pos+1)) >> cv.y)) { in.setstate(ios::badbit); }
69
70 } else {
71
72 in.setstate(ios::badbit);
73 }
74
75 return in;
76 }
static const char SEPARATOR
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JCanvas & | cv ) |
|
friend |
Write canvas to output stream.
- Parameters
-
| out | output stream |
| cv | canvas |
- Returns
- output stream
Definition at line 86 of file JCanvas.hh.
87 {
89
90 return out;
91 }
◆ SEPARATOR
| const char JROOT::JCanvas::SEPARATOR = 'x' |
|
static |
number of pixels in X
Definition at line 94 of file JCanvas.hh.
number of pixels in Y
Definition at line 95 of file JCanvas.hh.
The documentation for this class was generated from the following file: