Commit c87ef9f5 authored by Jason Shepherd's avatar Jason Shepherd
Browse files

ENH: Account for the line offset in the text property in the unicode labeling.

parent 9f2c9e67
......@@ -52,7 +52,7 @@ PURPOSE. See the above copyright notice for more information.
#define VTK_CREATE(type, name) \
vtkSmartPointer<type> name = vtkSmartPointer<type>::New()
vtkCxxRevisionMacro(vtkQtLabelSurface, "1.3");
vtkCxxRevisionMacro(vtkQtLabelSurface, "1.4");
vtkStandardNewMacro(vtkQtLabelSurface);
vtkCxxSetObjectMacro(vtkQtLabelSurface,LabelTextProperty,vtkTextProperty);
......@@ -449,6 +449,7 @@ void vtkQtLabelSurface::BuildLabelsInternal(vtkDataSet* input, QPainter* painter
}
// radian_rotation = 45.;
double line_offset = this->LabelTextProperty->GetLineOffset();
if( this->LabelTextProperty->GetShadow() )
{
painter->save();
......@@ -459,6 +460,7 @@ void vtkQtLabelSurface::BuildLabelsInternal(vtkDataSet* input, QPainter* painter
painter->translate( x[0], h-x[1] );
painter->rotate( rotation );
painter->translate( delta_x, delta_y );
painter->translate( 0., line_offset );
painter->translate( shOff[0], -shOff[1] );
double shadowColor[3];
......@@ -479,6 +481,7 @@ void vtkQtLabelSurface::BuildLabelsInternal(vtkDataSet* input, QPainter* painter
painter->translate( x[0], h-x[1] );
painter->rotate( rotation );
painter->translate( delta_x, delta_y );
painter->translate( 0., line_offset );
QTextDocument( textDocument );
textDocument.setDefaultFont( fontSpec );
......
Supports Markdown
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