Changeset 637 for trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
- Timestamp:
- Dec 5, 2007, 2:41:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r636 r637 1310 1310 if ((!aImage.isGrayscale ()) &&(aInColor ==1 )) { 1311 1311 #if QT_VERSION < 0x040000 1312 aImage .convertDepth(1,Qt::MonoOnly);1313 #else 1314 aImage .convertToFormat ( aImage.format(), Qt::MonoOnly);1312 aImage = aImage.convertDepth(1,Qt::MonoOnly); 1313 #else 1314 aImage = aImage.convertToFormat ( aImage.format(), Qt::MonoOnly); 1315 1315 #endif 1316 1316 } … … 1397 1397 */ 1398 1398 } else if (depth == 8) { 1399 #ifdef GEANT4_QT_DEBUG1400 printf("has 8 bit\n");1401 #endif1402 1399 for(int y=height-1; y >=0 ; y--) { 1403 1400 const uchar * s = aImage.scanLine(y); … … 1494 1491 QPrinter printer; 1495 1492 // printer.setPageSize(pageSize); 1496 if (aInColor == 1) { 1497 printer.setColorMode(QPrinter::GrayScale); 1498 } else { 1499 printer.setColorMode(QPrinter::Color); 1500 } 1493 1494 // FIXME : L. Garnier 4/12/07 1495 // This is not working, it does nothing. Image is staying in color mode 1496 // So I have desactivate the B/W button in GUI 1497 if ((!aImage.isGrayscale ()) &&(aInColor ==1 )) { 1498 #if QT_VERSION < 0x040000 1499 aImage = aImage.convertDepth(1,Qt::MonoOnly); 1500 #else 1501 aImage = aImage.convertToFormat ( aImage.format(), Qt::MonoOnly); 1502 #endif 1503 } 1504 1501 1505 1502 1506 if (aFilename.endsWith(".ps")) { … … 1514 1518 // printer.setFullPage ( true); 1515 1519 QPainter paint(&printer); 1516 paint.drawImage (0,0,aImage 1520 paint.drawImage (0,0,aImage); 1517 1521 paint.end(); 1518 1522 #endif
Note: See TracChangeset
for help on using the changeset viewer.