Changeset 4827 for nanovis/branches


Ignore:
Timestamp:
Dec 9, 2014, 5:10:48 PM (5 years ago)
Author:
ldelgass
Message:

fix for snapshot command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.1/Command.cpp

    r4826 r4827  
    616616            Tcl_Obj *const *objv)
    617617{
    618     int w, h;
    619 
    620     w = NanoVis::winWidth, h = NanoVis::winHeight;
    621 
    622     NanoVis::resizeOffscreenBuffer(2048, 2048);
    623 #ifdef notdef
    624     NanoVis::cam->setScreenSize(0, 0, NanoVis::winWidth, NanoVis::winHeight);
    625     NanoVis::cam->setScreenSize(30, 90, 2048 - 60, 2048 - 120);
    626 #endif
    627     NanoVis::bindOffscreenBuffer();  //enable offscreen render
     618    int origWidth, origHeight, width, height;
     619
     620    origWidth = NanoVis::winWidth;
     621    origHeight = NanoVis::winHeight;
     622    width = 2048;
     623    height = 2048;
     624
     625    NanoVis::resizeOffscreenBuffer(width, height);
     626    NanoVis::bindOffscreenBuffer();
    628627    NanoVis::render();
    629628    NanoVis::readScreen();
    630629
    631     NanoVis::ppmWrite("nv>image -type print -bytes %d");
    632     NanoVis::resizeOffscreenBuffer(w, h);
     630    NanoVis::ppmWrite("nv>image -type print -bytes");
     631    NanoVis::resizeOffscreenBuffer(origWidth, origHeight);
    633632
    634633    return TCL_OK;
Note: See TracChangeset for help on using the changeset viewer.