Commit fa29d2df authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Better placement strategy to avoid title overflow in Y

Change-Id: I37f284dbb8d0985a12752dba8323de500bde07da
parent 54c97fe3
......@@ -585,9 +585,7 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
rgb[3] = rgba[3];
}
}
cerr << "size: " << size[0] << " " << size[1] << endl;
cerr << "TitleSize: " << size[0] << " " << titleSize[1] << endl;
cerr << endl;
// generate background and frame points and cell
x[0]=0; x[1]=0;
bgPts->SetPoint(0,x);
......@@ -616,7 +614,6 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
int sizeTextData[2];
if (this->Orientation == VTK_ORIENT_VERTICAL)
{
// center the title
this->TitleActor->SetPosition(size[0]/2, 0.9*size[1]);
......@@ -643,11 +640,11 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
}
}
}
else
else // if (this->Orientation == VTK_ORIENT_VERTICAL)
{
if (this->TextPosition == vtkScalarBarActor::PrecedeScalarBar)
{
this->TitleActor->SetPosition(size[0]/2, barY);
this->TitleActor->SetPosition(size[0]/2, barY + 0.1*titleSize[1]);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment