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
2c18c898
Commit
2c18c898
authored
Oct 29, 2012
by
Tiago Peixoto
Browse files
Fix dependency on gobject
parent
4f894336
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/draw/cairo_draw.py
View file @
2c18c898
...
...
@@ -682,6 +682,9 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None,
srf
=
cairo
.
PDFSurface
(
out
,
output_size
[
0
],
output_size
[
1
])
elif
fmt
==
"ps"
:
srf
=
cairo
.
PSSurface
(
out
,
output_size
[
0
],
output_size
[
1
])
elif
fmt
==
"eps"
:
srf
=
cairo
.
PSSurface
(
out
,
output_size
[
0
],
output_size
[
1
])
srf
.
set_eps
(
True
)
elif
fmt
==
"svg"
:
srf
=
cairo
.
SVGSurface
(
out
,
output_size
[
0
],
output_size
[
1
])
elif
fmt
==
"png"
:
...
...
@@ -857,7 +860,7 @@ def transform_scale(M, scale):
try
:
from
gi.repository
import
Gtk
,
Gdk
,
GdkPixbuf
import
gobject
import
gi._gobject
as
gobject
from
.gtk_draw
import
*
except
(
ImportError
,
RuntimeError
)
as
e
:
msg
=
"Error importing Gtk module: %s; GTK+ drawing will not work."
%
str
(
e
)
...
...
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