Commits

Takeshi Komiya committed 6a979e1

Fixed thumbnail images has broken with :maxwidth: option

Comments (0)

Files changed (8)

 
 setup(
     name='sphinxcontrib-actdiag',
-    version='0.2.2',
+    version='0.2.3',
     url='http://bitbucket.org/birkenfeld/sphinx-contrib',
     download_url='http://pypi.python.org/pypi/sphinxcontrib-actdiag',
     license='BSD',

actdiag/sphinxcontrib/actdiag.py

             trelfn, toutfn = get_image_filename(self, code, format,
                                                 options, thumb_prefix)
 
-            thumb_size = (options['maxwidth'], image_size[1])
+            ratio = float(options['maxwidth']) / image_size[0]
+            thumb_size = (options['maxwidth'], image_size[1] * ratio)
             if not os.path.isfile(toutfn):
                 image.filename = toutfn
                 image.draw()

blockdiag/setup.py

 
 setup(
     name='sphinxcontrib-blockdiag',
-    version='0.9.2',
+    version='0.9.3',
     url='http://bitbucket.org/birkenfeld/sphinx-contrib',
     download_url='http://pypi.python.org/pypi/sphinxcontrib-blockdiag',
     license='BSD',

blockdiag/sphinxcontrib/blockdiag.py

             trelfn, toutfn = get_image_filename(self, code, format,
                                                 options, thumb_prefix)
 
-            thumb_size = (options['maxwidth'], image_size[1])
+            ratio = float(options['maxwidth']) / image_size[0]
+            thumb_size = (options['maxwidth'], image_size[1] * ratio)
             if not os.path.isfile(toutfn):
                 image.filename = toutfn
                 image.draw()
 
 setup(
     name='sphinxcontrib-nwdiag',
-    version='0.2.2',
+    version='0.2.3',
     url='http://bitbucket.org/birkenfeld/sphinx-contrib',
     download_url='http://pypi.python.org/pypi/sphinxcontrib-nwdiag',
     license='BSD',

nwdiag/sphinxcontrib/nwdiag.py

             trelfn, toutfn = get_image_filename(self, code, format,
                                                 options, thumb_prefix)
 
-            thumb_size = (options['maxwidth'], image_size[1])
+            ratio = float(options['maxwidth']) / image_size[0]
+            thumb_size = (options['maxwidth'], image_size[1] * ratio)
             if not os.path.isfile(toutfn):
                 image.filename = toutfn
                 image.draw()
 
 setup(
     name='sphinxcontrib-seqdiag',
-    version='0.2.2',
+    version='0.2.3',
     url='http://bitbucket.org/birkenfeld/sphinx-contrib',
     download_url='http://pypi.python.org/pypi/sphinxcontrib-seqdiag',
     license='BSD',

seqdiag/sphinxcontrib/seqdiag.py

             trelfn, toutfn = get_image_filename(self, code, format,
                                                 options, thumb_prefix)
 
-            thumb_size = (options['maxwidth'], image_size[1])
+            ratio = float(options['maxwidth']) / image_size[0]
+            thumb_size = (options['maxwidth'], image_size[1] * ratio)
             if not os.path.isfile(toutfn):
                 image.filename = toutfn
                 image.draw()