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
3ac3f09b
Commit
3ac3f09b
authored
Dec 02, 2011
by
Philippe Pébay
Browse files
Using adjustable X and Y 2 offsets (defaults: -40 and -50)
Change-Id: I4aeb372bcefee6a953751ac20be3f8d1430ccd8b
parent
a49b0e9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Examples/Hybrid/Python/CylinderAndPolarAxes.py
View file @
3ac3f09b
...
...
@@ -55,7 +55,9 @@ polaxes.GetPolarArcsProperty().SetColor( 1., .0, 0. )
polaxes
.
GetPolarAxisProperty
().
SetColor
(
0.
,
1.
,
0.
)
polaxes
.
GetPolarAxisTitleTextProperty
().
SetColor
(
0.
,
1.
,
0.
)
polaxes
.
GetPolarAxisLabelTextProperty
().
SetColor
(
0.
,
1.
,
0.
)
polaxes
.
SetEnableDistanceLOD
(
0
)
polaxes
.
SetDistanceLODThreshold
(
.
4
)
polaxes
.
SetEnableViewAngleLOD
(
0
)
polaxes
.
SetViewAngleLODThreshold
(
.
2
)
polaxes
.
SetScreenSize
(
8.
)
...
...
@@ -72,4 +74,8 @@ interactor.SetRenderWindow( window )
# Start interaction
window
.
Render
()
polaxes
.
SetMaximumAngle
(
120.
)
window
.
Render
()
interactor
.
Start
()
Hybrid/vtkAxisActor.cxx
View file @
3ac3f09b
...
...
@@ -181,8 +181,8 @@ vtkAxisActor::vtkAxisActor()
this
->
Use2DMode
=
0
;
this
->
SaveTitlePosition
=
0
;
this
->
TitleConstantPosition
[
0
]
=
this
->
TitleConstantPosition
[
1
]
=
0.
;
this
->
VerticalOffsetXTitle2D
=
-
2
0.
;
this
->
HorizontalOffsetYTitle2D
=
-
2
0.
;
this
->
VerticalOffsetXTitle2D
=
-
4
0.
;
this
->
HorizontalOffsetYTitle2D
=
-
5
0.
;
}
// ****************************************************************
...
...
@@ -940,11 +940,11 @@ vtkAxisActor::BuildTitle2D(vtkViewport *viewport, bool force)
viewport
->
GetDisplayPoint
(
transpos
);
if
(
this
->
AxisType
==
VTK_AXIS_TYPE_X
)
{
transpos
[
1
]
-
=
12
;
transpos
[
1
]
+
=
this
->
VerticalOffsetXTitle2D
;
}
else
if
(
this
->
AxisType
==
VTK_AXIS_TYPE_Y
)
{
transpos
[
0
]
-
=
20
;
transpos
[
0
]
+
=
this
->
HorizontalOffsetYTitle2D
;
}
if
(
transpos
[
1
]
<
10.
)
transpos
[
1
]
=
10.
;
if
(
transpos
[
0
]
<
10.
)
transpos
[
0
]
=
10.
;
...
...
Hybrid/vtkAxisActor.h
View file @
3ac3f09b
...
...
@@ -520,7 +520,7 @@ class VTK_HYBRID_EXPORT vtkAxisActor : public vtkActor
// Description:
// Vertical offset in display coordinates for X axis title (used in 2D mode only)
// Default: -
4
0
// Default: -
5
0
double
HorizontalOffsetYTitle2D
;
// Description:
...
...
Write
Preview
Markdown
is supported
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