Changeset 1106


Ignore:
Timestamp:
Oct 2, 2009, 3:31:58 PM (15 years ago)
Author:
garnier
Message:

addDrawText

File:
1 edited

Legend:

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

    r1094 r1106  
    18081808    if (event->key() == Qt::Key_Plus) {
    18091809      fVP.SetZoomFactor(fVP.GetZoomFactor()*(1+fDeltaZoom));
     1810#ifdef G4DEBUG_VIS_OGL
     1811      printf("G4OpenGLQtViewer::KeyPressEvent zoomFactor=%f\n",fVP.GetZoomFactor()*(1+fDeltaZoom));
     1812#endif
    18101813      updateQWidget();
    18111814    }
     
    25512554
    25522555
     2556void G4OpenGLQtViewer::drawText(
     2557 const char * str
     2558,int x
     2559,int y
     2560,int z
     2561,int size ) {
     2562
     2563#ifdef G4DEBUG_VIS_OGL
     2564  printf ("G4OpenGLStoredQtViewer::drawText-position %d,%d,%d-----------------------------------------\n",x,y,z);
     2565#endif 
     2566
     2567  QFont f1 = QFont("Courrier", size, QFont::Bold);
     2568  f1.setPointSizeF(20);
     2569
     2570  // FIXME : Interesting border effect : resizing world resize detector
     2571  // but not traces !
     2572  glColor3d (0.123456,0.1234560,0.123456);
     2573  fWindow->renderText (x,y,z,str,f1);
     2574  glColor3d (0.321,0.321,0.321);
     2575}
     2576
     2577
    25532578// FIXME : does not work on Qt3
    25542579void G4OpenGLQtViewer::processEncodeStdout()
Note: See TracChangeset for help on using the changeset viewer.