Ignore:
Timestamp:
Jan 15, 2009, 5:41:07 PM (16 years ago)
Author:
garnier
Message:

for aspect radio. Ok for Qt, Xm, but not X. Debug mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r898 r906  
    2525//
    2626//
    27 // $Id: G4OpenGLQtViewer.cc,v 1.30 2008/11/06 13:43:44 lgarnier Exp $
     27// $Id: G4OpenGLQtViewer.cc,v 1.31 2009/01/13 09:47:05 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    8989  G4OpenGLViewer::SetView ();
    9090}
    91 
    92 /**
    93  * Set the viewport of the scene
    94  */
    95 void G4OpenGLQtViewer::setupViewport(int aWidth, int aHeight)
    96 {
    97   int side = aWidth;
    98   if (aHeight < aWidth) side = aHeight;
    99   glViewport((aWidth - side) / 2, (aHeight - side) / 2, side, side);
    100  
    101   glMatrixMode(GL_PROJECTION);
    102   glLoadIdentity();
    103   glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
    104   glMatrixMode(GL_MODELVIEW);
    105 }
    106 
    107 
    10891
    10992
     
    788771
    789772
    790 void G4OpenGLQtViewer::G4resizeGL(
    791  int aWidth
    792 ,int aHeight)
    793 
    794   setupViewport(aWidth,aHeight);
    795  
    796   if (((fWinSize_x != (unsigned int)aWidth)) || (fWinSize_y != (unsigned int) aHeight)) {
    797     hasToRepaint =true;
    798   }
    799   fWinSize_x = (unsigned int) aWidth;
    800   fWinSize_y = (unsigned int) aHeight;
    801 }
    802 
    803 
    804773void G4OpenGLQtViewer::G4manageContextMenuEvent(QContextMenuEvent *e)
    805774{
Note: See TracChangeset for help on using the changeset viewer.