Ignore:
Timestamp:
02/19/14 20:41:19 (10 years ago)
Author:
WataruKawasaki
Message:

New Development: Yes

JIRA Issue: Yes CAS-6168

Ready for Test: Yes

Interface Changes:

What Interface Changed:

Test Programs:

Put in Release Notes: Yes

Module(s): sd.plotter2

Description: added methods to sd.plotter2 to enable changing the size and shape of the entire region to be plotted (which is referred to as 'viewsurface' in PGPLOT).


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Plotter2.cpp

    r2861 r2895  
    294294    hasDefaultViewport = true;
    295295    currentViewportId = 0;
     296
     297    width = 8.82796; // default viewsurface width seems to be this value.
     298    aspect = 0.75;   // default viewsurface aspect
    296299}
    297300
     
    320323    cpgopen((filename + "/" + device).c_str());
    321324    hasDevice = true;
     325}
     326
     327float Plotter2::getViewSurfaceWidth() {
     328    return width;
     329}
     330
     331float Plotter2::getViewSurfaceAspect() {
     332    return aspect;
     333}
     334
     335void Plotter2::setViewSurface(const float inWidth, const float inAspect) {
     336    width = inWidth;
     337    aspect = inAspect;
    322338}
    323339
     
    11271143    open();
    11281144
     1145    if ((width > 0.0) && (aspect > 0.0)) {
     1146        cpgpap(width, aspect);
     1147    }
     1148
    11291149    cpgscr(0, 1.0, 1.0, 1.0); // set background color white
    11301150    cpgscr(1, 0.0, 0.0, 0.0); // set foreground color black
Note: See TracChangeset for help on using the changeset viewer.