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
a328936d
Commit
a328936d
authored
Nov 16, 2011
by
Philippe Pébay
Browse files
Better vertical placement of titles in V bars
Change-Id: I5dcd87e5337ced5a8103aafb4b0486bf03091508
parent
8c4f9fc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Rendering/vtkScalarBarActor.cxx
View file @
a328936d
...
...
@@ -631,12 +631,13 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
this
->
TextMappers
[
i
]
->
GetTextProperty
()
->
SetJustificationToLeft
();
if
(
this
->
TextPosition
==
vtkScalarBarActor
::
PrecedeScalarBar
)
{
this
->
TextActors
[
i
]
->
SetPosition
(
barX
,
val
-
sizeTextData
[
1
]
/
2
);
this
->
TextActors
[
i
]
->
SetPosition
(
barX
,
val
-
0.6
*
sizeTextData
[
1
]);
}
else
{
this
->
TextActors
[
i
]
->
SetPosition
(
barX
+
barWidth
+
3
,
val
-
sizeTextData
[
1
]
/
2
);
val
-
0.6
*
sizeTextData
[
1
]);
}
}
}
...
...
@@ -644,12 +645,13 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
{
if
(
this
->
TextPosition
==
vtkScalarBarActor
::
PrecedeScalarBar
)
{
this
->
TitleActor
->
SetPosition
(
size
[
0
]
/
2
,
barY
+
0.1
*
titleSize
[
1
]);
this
->
TitleActor
->
SetPosition
(
size
[
0
]
/
2
,
barY
+
0.1
*
titleSize
[
1
]);
}
else
{
this
->
TitleActor
->
SetPosition
(
size
[
0
]
/
2
,
barHeight
+
labelSize
[
1
]
+
0.1
*
size
[
1
]);
barHeight
+
labelSize
[
1
]
+
0.1
*
size
[
1
]
+
0.15
*
titleSize
[
1
]
);
}
for
(
i
=
0
;
i
<
this
->
NumberOfLabels
;
i
++
)
{
...
...
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