File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def _fn_name(): return sys._getframe(1).f_code.co_name
17
17
from md5 import md5 #Deprecated in 2.5
18
18
19
19
from tempfile import mkstemp
20
- from matplotlib import verbose , __version__ , rcParams
20
+ from matplotlib import verbose , __version__ , rcParams , checkdep_ghostscript
21
21
from matplotlib ._pylab_helpers import Gcf
22
22
from matplotlib .afm import AFM
23
23
from matplotlib .backend_bases import RendererBase , GraphicsContextBase ,\
@@ -70,8 +70,9 @@ def gs_exe(self):
70
70
except KeyError :
71
71
pass
72
72
73
- if sys .platform == 'win32' : gs_exe = 'gswin32c'
74
- else : gs_exe = 'gs'
73
+ gs_exe , gs_version = checkdep_ghostscript ()
74
+ if gs_exe is None :
75
+ gs_exe = 'gs'
75
76
76
77
self ._cached ["gs_exe" ] = gs_exe
77
78
return gs_exe
@@ -1617,8 +1618,7 @@ def get_bbox(tmpfile, bbox):
1617
1618
"""
1618
1619
1619
1620
outfile = tmpfile + '.output'
1620
- if sys .platform == 'win32' : gs_exe = 'gswin32c'
1621
- else : gs_exe = 'gs'
1621
+ gs_exe = ps_backend_helper .gs_exe
1622
1622
command = '%s -dBATCH -dNOPAUSE -sDEVICE=bbox "%s"' % \
1623
1623
(gs_exe , tmpfile )
1624
1624
verbose .report (command , 'debug' )
You can’t perform that action at this time.
0 commit comments