this->LastSize[0] = 0;
this->LastSize[1] = 0;
- this->TitleRatioWidth = 0;
+ this->TitleRatioSize = 0;
this->LabelRatioWidth = 0;
this->BarRatioWidth = 0;
- this->TitleRatioHeight = 0;
- this->LabelRatioHeight = 0;
this->BarRatioHeight = 0;
// RKV : Begin
else
targetWidth = (int)(0.01*LabelRatioWidth*size[0]);
- if(LabelRatioHeight == 0)
- if ( this->Orientation == VTK_ORIENT_VERTICAL )
- targetHeight = (int)(0.86*size[1]/this->NumberOfLabels);
- else
- targetHeight = (int)(0.25*size[1]);
+ if ( this->Orientation == VTK_ORIENT_VERTICAL )
+ targetHeight = (int)(0.86*size[1]/this->NumberOfLabels);
else
- targetHeight = (int)(0.01*LabelRatioHeight*size[1]);
+ targetHeight = (int)(0.25*size[1]);
vtkTextMapper::SetMultipleConstrainedFontSize(viewport,
targetWidth,
int targetWidth, targetHeight;
- if(TitleRatioWidth == 0)
+ if(TitleRatioSize == 0)
targetWidth = size[0];
else
- targetWidth = (int)(0.01*TitleRatioWidth*size[0]);
+ targetWidth = (int)(0.01*TitleRatioSize*size[0]);
- if(TitleRatioHeight == 0)
- if ( this->Orientation == VTK_ORIENT_VERTICAL )
- targetHeight = (int)(0.1*size[1]);
- else
- targetHeight = (int)(0.25*size[1]);
+ if ( this->Orientation == VTK_ORIENT_VERTICAL )
+ targetHeight = (int)(0.1*size[1]);
else
- targetHeight = (int)(0.01*TitleRatioHeight*size[1]);
+ targetHeight = (int)(0.25*size[1]);
this->TitleMapper->SetConstrainedFontSize(
viewport, targetWidth, targetHeight);
}
// RKV : End
-void VISU_ScalarBarActor::SetRatios(int titleRatioWidth, int titleRatioHeight,
- int labelRatioWidth, int labelRatioHeight,
+void VISU_ScalarBarActor::SetRatios(int titleRatioSize, int labelRatioWidth,
int barRatioWidth, int barRatioHeight)
{
- TitleRatioWidth=titleRatioWidth;
- if(TitleRatioWidth>100)
- TitleRatioWidth=100;
- else if(TitleRatioWidth<0)
- TitleRatioWidth=0;
-
- TitleRatioHeight=titleRatioHeight;
- if(TitleRatioHeight>100)
- TitleRatioHeight=100;
- else if(TitleRatioHeight<0)
- TitleRatioHeight=0;
+ TitleRatioSize=titleRatioSize;
+ if(TitleRatioSize>100)
+ TitleRatioSize=100;
+ else if(TitleRatioSize<0)
+ TitleRatioSize=0;
LabelRatioWidth=labelRatioWidth;
if(LabelRatioWidth>100)
else if(LabelRatioWidth<0)
LabelRatioWidth=0;
- LabelRatioHeight=labelRatioHeight;
- if(LabelRatioHeight>100)
- LabelRatioHeight=100;
- else if(LabelRatioHeight<0)
- LabelRatioHeight=0;
-
BarRatioWidth=barRatioWidth;
if(BarRatioWidth>100)
BarRatioWidth=100;
BarRatioHeight=0;
}
-void VISU_ScalarBarActor::GetRatios(int& titleRatioWidth, int& titleRatioHeight,
- int& labelRatioWidth, int& labelRatioHeight,
- int& barRatioWidth, int& barRatioHeight)
+void VISU_ScalarBarActor::GetRatios(int& titleRatioSize, int& labelRatioWidth,
+ int& barRatioWidth, int& barRatioHeight)
{
- titleRatioWidth=TitleRatioWidth;
- titleRatioHeight=TitleRatioHeight;
+ titleRatioSize=TitleRatioSize;
labelRatioWidth=LabelRatioWidth;
- labelRatioHeight=LabelRatioHeight;
barRatioWidth=BarRatioWidth;
barRatioHeight=BarRatioHeight;
}
// Description:
// Set/Get the scalar bar dimention properties in persents.
// 0 <= ration <= 100
- void SetRatios(int titleRatioWidth, int titleRatioHeight,
- int labelRatioWidth, int labelRatioHeight,
+ void SetRatios(int titleRatioSize,int labelRatioWidth,
int barRatioWidth, int barRatioHeight);
- void GetRatios(int& titleRatioWidth, int& titleRatioHeight,
- int& labelRatioWidth, int& labelRatioHeight,
+ void GetRatios(int& titleRatioSize, int& labelRatioWidth,
int& barRatioWidth, int& barRatioHeight);
// Description:
int Orientation;
char *Title;
char *LabelFormat;
- int TitleRatioWidth;
+ int TitleRatioSize;
int LabelRatioWidth;
int BarRatioWidth;
- int TitleRatioHeight;
- int LabelRatioHeight;
int BarRatioHeight;
vtkTextMapper **TextMappers;