- Timestamp:
- 02/19/14 20:41:19 (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Plotter2.cpp
r2861 r2895 294 294 hasDefaultViewport = true; 295 295 currentViewportId = 0; 296 297 width = 8.82796; // default viewsurface width seems to be this value. 298 aspect = 0.75; // default viewsurface aspect 296 299 } 297 300 … … 320 323 cpgopen((filename + "/" + device).c_str()); 321 324 hasDevice = true; 325 } 326 327 float Plotter2::getViewSurfaceWidth() { 328 return width; 329 } 330 331 float Plotter2::getViewSurfaceAspect() { 332 return aspect; 333 } 334 335 void Plotter2::setViewSurface(const float inWidth, const float inAspect) { 336 width = inWidth; 337 aspect = inAspect; 322 338 } 323 339 … … 1127 1143 open(); 1128 1144 1145 if ((width > 0.0) && (aspect > 0.0)) { 1146 cpgpap(width, aspect); 1147 } 1148 1129 1149 cpgscr(0, 1.0, 1.0, 1.0); // set background color white 1130 1150 cpgscr(1, 0.0, 0.0, 0.0); // set foreground color black -
trunk/src/Plotter2.h
r2861 r2895 162 162 void setDevice(const std::string& inDevice); 163 163 164 float getViewSurfaceWidth(); 165 float getViewSurfaceAspect(); 166 void setViewSurface(const float width, const float aspect); 164 167 int addViewport(const float xmin, const float xmax, const float ymin, const float ymax); 165 168 void setViewport(const float xmin, const float xmax, const float ymin, const float ymax, const int id); … … 208 211 bool hasDefaultViewport; 209 212 int currentViewportId; 213 float width; 214 float aspect; 210 215 void open(); 211 216 void close(); -
trunk/src/python_Plotter2.cpp
r2830 r2895 44 44 .def("get_device",&Plotter2::getDevice) 45 45 .def("set_device",&Plotter2::setDevice) 46 .def("get_viewsurface_width",&Plotter2::getViewSurfaceWidth) 47 .def("get_viewsurface_aspect",&Plotter2::getViewSurfaceAspect) 48 .def("set_viewsurface",&Plotter2::setViewSurface) 46 49 .def("add_viewport",&Plotter2::addViewport) 47 50 .def("set_viewport",&Plotter2::setViewport)
Note:
See TracChangeset
for help on using the changeset viewer.