Salome HOME
debug of tests
[modules/hydro.git] / src / HYDRO_tests / test_Overview.cxx
index a83af23d8a4045591e875a1d865393d489a9e1bb..9bf5e7f4dea782c5708da5c6d200dfa17e6994d9 100644 (file)
@@ -58,7 +58,8 @@ QImage test_Overview::dumpViews()
   QImage aMain = TestViewer::viewWindow()->getView(OCCViewer_ViewFrame::MAIN_VIEW)->dumpView();
   QImage anOverview = myOverview->dump();
 
-  aMain = aMain.rgbSwapped();              //PATCH for image came from OCCT dump
+  if (SWAP_RGB)
+    aMain = aMain.rgbSwapped();              //PATCH for image came from OCCT dump
   //anOverview = anOverview.rgbSwapped();  //overview dump already normalizes the image, the line is not necessary!!!
 
   int w1 = aMain.width();
@@ -74,9 +75,6 @@ QImage test_Overview::dumpViews()
   QPainter painter( &pix );
   painter.setPen( PSOLID );
 
-  painter.drawRect( WIDTH, WIDTH, w2, h2 );
-  painter.drawRect( w2+WIDTH, WIDTH, w1, h1 );
-
   //static int q = 0;
   //q++;
   //anOverview.save( QString( "/tmp/hydro/overview_" ) + QString::number( q ) + ".png" );
@@ -85,6 +83,9 @@ QImage test_Overview::dumpViews()
   painter.drawImage( WIDTH, WIDTH, anOverview );
   painter.drawImage( w2+WIDTH, WIDTH, aMain );
 
+  painter.drawRect( WIDTH, WIDTH, w2, h2 );
+  painter.drawRect( w2+WIDTH, WIDTH, w1, h1 );
+
   QImage res = pix.toImage();
   //res.save( QString( "/tmp/hydro/result_" ) + QString::number( q ) + ".png" );