- SUIT_Session* session = SUIT_Session::session();
- SUIT_ResourceMgr* resMgr = session->resourceMgr();
-
- Standard_Real anXPos = resMgr->doubleValue( "Geometry", "scalar_bar_x_position", 0.05 );
- Standard_Real anYPos = resMgr->doubleValue( "Geometry", "scalar_bar_y_position", 0.1 );
- Standard_Real aWidth = resMgr->doubleValue( "Geometry", "scalar_bar_width", 0.2 );
- Standard_Real aHeight = resMgr->doubleValue( "Geometry", "scalar_bar_height", 0.5 );
- Standard_Integer aTextHeight = resMgr->integerValue( "Geometry", "scalar_bar_text_height", 14 );
- Standard_Integer aNbIntervals = resMgr->integerValue( "Geometry", "scalar_bar_nb_intervals", 20 );
-
- aColorScale->SetXPosition( anXPos );
- aColorScale->SetYPosition( anYPos );
- aColorScale->SetWidth( aWidth );
- aColorScale->SetHeight( aHeight );
-
- aColorScale->SetTextHeight( aTextHeight );
- aColorScale->SetNumberOfIntervals( anIsBoolean ? 2 : aNbIntervals );
-
- aColorScale->SetTitle( aColorScaleTitle );
- aColorScale->SetRange( aColorScaleMin, aColorScaleMax );
+ myColorScale->SetXPosition( anXPos );
+ myColorScale->SetYPosition( anYPos );
+ myColorScale->SetWidth( aWidth );
+ myColorScale->SetHeight( aHeight );
+#else
+ Standard_Integer aWinWidth = 0, aWinHeight = 0;
+ aView->Window()->Size (aWinWidth, aWinHeight);
+
+ myColorScale->SetPosition (aWinWidth*anXPos, aWinHeight*anYPos);
+ //myColorScale->SetBreadth (aWinWidth); // ???
+ myColorScale->SetBreadth (aWinWidth*aWidth); // ???
+ myColorScale->SetHeight (aWinHeight*aHeight);
+#endif
+
+ myColorScale->SetRange( aColorScaleMin, aColorScaleMax );
+ myColorScale->SetNumberOfIntervals( anIsBoolean ? 2 : aNbIntervals );
+
+ myColorScale->SetTextHeight( aTextHeight );
+ myColorScale->SetTitle( aColorScaleTitle );
+
+#if OCC_VERSION_MAJOR < 7