Changeset 637 for trunk/geant4
- Timestamp:
- Dec 5, 2007, 2:41:42 PM (17 years ago)
- Location:
- trunk/geant4/visualization/OpenGL/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
r636 r637 111 111 } 112 112 113 if ((nomFich.endsWith(".ps")) || (nomFich.endsWith(".pdf")) || (nomFich.endsWith(".eps"))) { 113 // FIXME : L. Garnier 4/12/07 114 // This is not working for PS and PDF images, it does nothing. 115 // Image is staying in color mode 116 // if ((nomFich.endsWith(".ps")) || (nomFich.endsWith(".pdf")) || (nomFich.endsWith(".eps"))) { 117 if ((nomFich.endsWith(".eps"))) { 114 118 115 119 // transparencyEPS = new QCheckBox( "transparencyEPS" ); … … 361 365 int G4OpenGLQtExportDialog::getNbColor() 362 366 { 367 if (!colorButton) return -1; 363 368 // Black and white 364 369 if (!colorButton->isChecked()) … … 371 376 void G4OpenGLQtExportDialog::changeSizeBox() 372 377 { 378 if (!original) return; 379 if (!heightWidget) return; 380 if (!widthWidget) return; 381 if (!ratioCheckBox) return; 382 373 383 if ( original->isChecked()) { 374 384 heightWidget->hide(); … … 386 396 ) 387 397 { 398 if (!ratioCheckBox) return; 399 if (!width) return; 400 388 401 if (ratioCheckBox->isChecked()){ 389 402 QString tmp; … … 396 409 ) 397 410 { 411 if (!ratioCheckBox) return; 412 if (!width) return; 413 398 414 if (ratioCheckBox->isChecked()){ 399 415 QString tmp; -
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.