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
Tiago Peixoto
graph-tool
Commits
b1cf2546
Commit
b1cf2546
authored
Jan 03, 2016
by
Tiago Peixoto
Browse files
Move animation demos to a subdirectory
parent
c114f861
Changes
9
Hide whitespace changes
Inline
Side-by-side
doc/demos/animation.rst
→
doc/demos/animation
/animation
.rst
View file @
b1cf2546
File moved
doc/demos/animation_dancing.py
→
doc/demos/animation
/animation
_dancing.py
View file @
b1cf2546
...
...
@@ -77,8 +77,9 @@ def update_state():
# The movement of the vertices may cause them to leave the display area. The
# following function rescales the layout to fit the window to avoid this.
if
count
%
1000
==
0
:
if
count
>
0
and
count
%
1000
==
0
:
win
.
graph
.
fit_to_window
(
ink
=
True
)
count
+=
1
# The following will force the re-drawing of the graph, and issue a
...
...
@@ -89,6 +90,7 @@ def update_state():
# if doing an offscreen animation, dump frame to disk
if
offscreen
:
pixbuf
=
win
.
get_pixbuf
()
print
(
pixbuf
.
get_width
(),
pixbuf
.
get_height
(),
pixbuf
.
get_rowstride
())
pixbuf
.
savev
(
r
'./frames/dancing%06d.png'
%
count
,
'png'
,
[],
[])
if
count
>
max_count
:
sys
.
exit
(
0
)
...
...
doc/demos/animation_sirs.py
→
doc/demos/animation
/animation
_sirs.py
View file @
b1cf2546
File moved
doc/demos/animation_zombies.py
→
doc/demos/animation
/animation
_zombies.py
View file @
b1cf2546
File moved
doc/demos/face-grin.png
→
doc/demos/
animation/
face-grin.png
View file @
b1cf2546
File moved
doc/demos/face-surprise.png
→
doc/demos/
animation/
face-surprise.png
View file @
b1cf2546
File moved
doc/demos/interactive_bst.py
→
doc/demos/
animation/
interactive_bst.py
View file @
b1cf2546
File moved
doc/demos/zombie.png
→
doc/demos/
animation/
zombie.png
View file @
b1cf2546
File moved
doc/demos/index.rst
View file @
b1cf2546
...
...
@@ -7,4 +7,4 @@ Contents:
:maxdepth: 3
:glob:
animation
\ No newline at end of file
animation/animation
\ No newline at end of file
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