Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote branch 'origin/V7_dev' into V8_0_0_BR
[modules/smesh.git]
/
src
/
OBJECT
/
SMESH_ScalarBarActor.cxx
diff --git
a/src/OBJECT/SMESH_ScalarBarActor.cxx
b/src/OBJECT/SMESH_ScalarBarActor.cxx
index d82962cb9553341b1df2cbaac31906bdb2306316..56118211441c46d067c77361641719506ec2b32c 100644
(file)
--- a/
src/OBJECT/SMESH_ScalarBarActor.cxx
+++ b/
src/OBJECT/SMESH_ScalarBarActor.cxx
@@
-320,7
+320,7
@@
int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
// rnv begin
// Customization of the vtkScalarBarActor to show distribution histogram.
// rnv begin
// Customization of the vtkScalarBarActor to show distribution histogram.
- bool distrVisibility = (numColors == this->myNbValues.size());
+ bool distrVisibility = (numColors ==
(int)
this->myNbValues.size());
vtkPoints *distrPts;
vtkCellArray *distrPolys;
vtkUnsignedCharArray *distColors = 0;
vtkPoints *distrPts;
vtkCellArray *distrPolys;
vtkUnsignedCharArray *distColors = 0;
@@
-328,12
+328,12
@@
int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
if(!distrVisibility)
vtkDebugMacro(<<" Distribution invisible, because numColors == this->myNbValues.size()");
if(!distrVisibility)
vtkDebugMacro(<<" Distribution invisible, because numColors == this->myNbValues.size()");
- if (
distrVisibility && GetDistributionVisibility()
) {
- for
( i=0 ;i<myNbValues.size();
i++ ) {
- if
(myNbValues[i]
) {
+ if (
distrVisibility && GetDistributionVisibility()
) {
+ for
( i = 0 ; i < (int)myNbValues.size();
i++ ) {
+ if
( myNbValues[i]
) {
numPositiveVal++;
maxValue = std::max(maxValue,myNbValues[i]);
numPositiveVal++;
maxValue = std::max(maxValue,myNbValues[i]);
- }
+ }
}
numDistrPts = 4*(numPositiveVal);
distrPts = vtkPoints::New();
}
numDistrPts = 4*(numPositiveVal);
distrPts = vtkPoints::New();
@@
-820,7
+820,7
@@
void SMESH_ScalarBarActor::AllocateAndSizeLabels(int *labelSize,
int targetWidth, targetHeight;
// rnv begin
// Customization of the vtkScalarBarActor to show distribution histogram.
int targetWidth, targetHeight;
// rnv begin
// Customization of the vtkScalarBarActor to show distribution histogram.
- bool distrVisibility =
this->MaximumNumberOfColors == this->myNbValues.size(
);
+ bool distrVisibility =
( this->MaximumNumberOfColors == (int) this->myNbValues.size()
);
double coef;
if( GetDistributionVisibility() && distrVisibility )
if(this->Orientation == VTK_ORIENT_VERTICAL)
double coef;
if( GetDistributionVisibility() && distrVisibility )
if(this->Orientation == VTK_ORIENT_VERTICAL)
@@
-856,40
+856,39
@@
void SMESH_ScalarBarActor::AllocateAndSizeLabels(int *labelSize,
}
//----------------------------------------------------------------------------
}
//----------------------------------------------------------------------------
-void SMESH_ScalarBarActor::SizeTitle(int *titleSize,
- int *size,
- vtkViewport *viewport)
+void SMESH_ScalarBarActor::SizeTitle(int *titleSize,
+ int *size,
+
vtkViewport *viewport)
{
titleSize[0] = titleSize[1] = 0;
if (this->Title == NULL || !strlen(this->Title))
{
titleSize[0] = titleSize[1] = 0;
if (this->Title == NULL || !strlen(this->Title))
-
{
+ {
return;
return;
-
}
+ }
int targetWidth, targetHeight;
int targetWidth, targetHeight;
-
+
targetWidth = size[0];
// rnv begin
// Customization of the vtkScalarBarActor to show distribution histogram.
targetWidth = size[0];
// rnv begin
// Customization of the vtkScalarBarActor to show distribution histogram.
- bool distrVisibility =
this->MaximumNumberOfColors == this->myNbValues.size(
);
+ bool distrVisibility =
( this->MaximumNumberOfColors == (int) this->myNbValues.size()
);
double coef;
double coef;
- if
( GetDistributionVisibility() && distrVisibility )
+ if
( GetDistributionVisibility() && distrVisibility )
coef=0.18;
coef=0.18;
- else
+ else
coef=0.25;
if ( this->Orientation == VTK_ORIENT_VERTICAL )
coef=0.25;
if ( this->Orientation == VTK_ORIENT_VERTICAL )
-
{
-
targetHeight = (int)(0.1*size[1]);
-
}
+ {
+ targetHeight = (int)(0.1*size[1]);
+ }
else
else
-
{
-
targetHeight = (int)(coef*size[1]);
-
}
+ {
+ targetHeight = (int)(coef*size[1]);
+ }
- this->TitleMapper->SetConstrainedFontSize(
- viewport, targetWidth, targetHeight);
+ this->TitleMapper->SetConstrainedFontSize(viewport, targetWidth, targetHeight);
this->TitleMapper->GetSize(viewport, titleSize);
}
this->TitleMapper->GetSize(viewport, titleSize);
}