MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / resize

Method resize

lib/matplotlib/backends/backend_qt.py:643–651  ·  view source on GitHub ↗
(self, width, height)

Source from the content-addressed store, hash-verified

641 # line is run, leading to a useless AttributeError.
642
643 def resize(self, width, height):
644 # The Qt methods return sizes in 'virtual' pixels so we do need to
645 # rescale from physical to logical pixels.
646 width = int(width / self.canvas.device_pixel_ratio)
647 height = int(height / self.canvas.device_pixel_ratio)
648 extra_width = self.window.width() - self.canvas.width()
649 extra_height = self.window.height() - self.canvas.height()
650 self.canvas.resize(width, height)
651 self.window.resize(width + extra_width, height + extra_height)
652
653 @classmethod
654 def start_main_loop(cls):

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 2

widthMethod · 0.80
heightMethod · 0.80

Tested by

no test coverage detected