]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for compatibility with OCCT7.5.3p5 jfa/OCCT780_753 30/head
authorjfa <jfa@opencascade.com>
Fri, 31 May 2024 13:44:48 +0000 (14:44 +0100)
committerjfa <jfa@opencascade.com>
Fri, 31 May 2024 13:44:48 +0000 (14:44 +0100)
src/OCCViewer/OCCViewer_ViewPort3d.cxx

index 7e7b26c13ed1edfb8f7dd308528b4954d7839ea1..3a64aa21056f35d2768f04f2199d648d0ead132f 100644 (file)
@@ -322,6 +322,7 @@ void OCCViewer_ViewPort3d::updateBackground()
        Quantity_Color qCol1( c1.red()/255., c1.green()/255., c1.blue()/255., Quantity_TOC_RGB );
        Quantity_Color qCol2( c2.red()/255., c2.green()/255., c2.blue()/255., Quantity_TOC_RGB );
        activeView()->SetBgImageStyle( Aspect_FM_NONE );    // cancel texture background
+#if OCC_VERSION_LARGE > 0x07070000
        switch ( type ) {
        case OCCViewer_Viewer::HorizontalGradient:
          activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GradientFillMethod_Horizontal, Standard_True );
@@ -350,6 +351,36 @@ void OCCViewer_ViewPort3d::updateBackground()
        default:
          break;
        }
+#else
+       switch ( type ) {
+       case OCCViewer_Viewer::HorizontalGradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_HOR, Standard_True );
+         break;
+       case OCCViewer_Viewer::VerticalGradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_VER, Standard_True );
+         break;
+       case OCCViewer_Viewer::Diagonal1Gradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG1, Standard_True );
+         break;
+       case OCCViewer_Viewer::Diagonal2Gradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG2, Standard_True );
+         break;
+       case OCCViewer_Viewer::Corner1Gradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_CORNER1, Standard_True );
+         break;
+       case OCCViewer_Viewer::Corner2Gradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_CORNER2, Standard_True );
+         break;
+       case OCCViewer_Viewer::Corner3Gradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_CORNER3, Standard_True );
+         break;
+       case OCCViewer_Viewer::Corner4Gradient:
+         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_CORNER4, Standard_True );
+         break;
+       default:
+         break;
+       }
+#endif
       }
       break;
     }