Skip to content
GitLab
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
53d1549d
Commit
53d1549d
authored
Dec 03, 2011
by
Philippe Pébay
Browse files
Fixed a memory leak
Change-Id: I940414cc20f6e84600341d255744f0f4fb20440f
parent
d4aedeca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Examples/Hybrid/Python/CylinderAndPolarAxes.py
View file @
53d1549d
...
...
@@ -46,7 +46,7 @@ polaxes.SetMinimumAngle( -60. )
polaxes
.
SetMaximumAngle
(
210.
)
polaxes
.
SetNumberOfRadialAxes
(
10
)
polaxes
.
SetNumberOfPolarAxisTicks
(
9
)
polaxes
.
Set
AutoSubdividePolarAxis
(
0
)
polaxes
.
AutoSubdividePolarAxis
Off
(
)
polaxes
.
SetCamera
(
renderer
.
GetActiveCamera
()
)
polaxes
.
SetPolarLabelFormat
(
"%6.1f"
)
polaxes
.
GetRadialAxesProperty
().
SetColor
(
.
0
,
.
0
,
1.
)
...
...
@@ -73,6 +73,6 @@ interactor.SetRenderWindow( window )
# Start interaction
window
.
Render
()
polaxes
.
SetNumberOfRadialAxes
(
18
)
polaxes
.
AutoSubdividePolarAxisOn
(
)
interactor
.
Start
()
Hybrid/vtkPolarAxesActor.cxx
View file @
53d1549d
...
...
@@ -788,6 +788,7 @@ void vtkPolarAxesActor::BuildPolarAxisTicks( double x0 )
// Use pre-set number of arcs when it is valid and no auto-subdivision was requested
delta
=
this
->
MaximumRadius
/
(
this
->
NumberOfPolarAxisTicks
-
1
);
}
// Set major start and delta corresponding to range and coordinates
this
->
PolarAxis
->
SetMajorRangeStart
(
0.
);
this
->
PolarAxis
->
SetDeltaRangeMajor
(
delta
);
...
...
@@ -987,6 +988,8 @@ void vtkPolarAxesActor::SetNumberOfRadialAxes( vtkIdType n )
this
->
RadialAxes
[
i
]
=
NULL
;
}
}
delete
[]
this
->
RadialAxes
;
this
->
RadialAxes
=
NULL
;
}
// Create and set n radial axes of type X
...
...
Hybrid/vtkPolarAxesActor.h
View file @
53d1549d
...
...
@@ -83,6 +83,7 @@ public:
// Default: true
vtkSetMacro
(
AutoSubdividePolarAxis
,
bool
);
vtkGetMacro
(
AutoSubdividePolarAxis
,
bool
);
vtkBooleanMacro
(
AutoSubdividePolarAxis
,
bool
);
// Description:
// Set/Get the maximum radius of the polar coordinates.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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