Merge pull request #7322 from kivy/fix_7314

Widget: fix export_to_png not passing arguments through
This commit is contained in:
matham 2021-01-09 21:50:12 -05:00 committed by GitHub
commit ac30e71c03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -82,9 +82,9 @@ class WidgetTestCase(unittest.TestCase):
wid.export_to_png(join(tmp, 'b.png'), scale=.5)
wid.export_to_png(join(tmp, 'c.png'), scale=2)
CoreImage(join(tmp, 'a.png')).size == (200, 100)
CoreImage(join(tmp, 'b.png')).size == (100, 50)
CoreImage(join(tmp, 'c.png')).size == (400, 200)
self.assertEqual(CoreImage(join(tmp, 'a.png')).size, (200, 100))
self.assertEqual(CoreImage(join(tmp, 'b.png')).size, (100, 50))
self.assertEqual(CoreImage(join(tmp, 'c.png')).size, (400, 200))
rmtree(tmp)
self.root.remove_widget(wid)

View File

@ -720,7 +720,7 @@ class Widget(WidgetBase):
.. versionadded:: 1.11.0
'''
self.export_as_image().save(filename, flipped=False)
self.export_as_image(*args, **kwargs).save(filename, flipped=False)
def export_as_image(self, *args, **kwargs):
'''Return an core :class:`~kivy.core.image.Image` of the actual