Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
c87ef9f5
Commit
c87ef9f5
authored
May 06, 2009
by
Jason Shepherd
Browse files
ENH: Account for the line offset in the text property in the unicode labeling.
parent
9f2c9e67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Rendering/vtkQtLabelSurface.cxx
View file @
c87ef9f5
...
...
@@ -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,7 +481,8 @@ 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
);
QString
styleSheet
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment