MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / set_size

Method set_size

dm_control/viewer/renderer.py:625–633  ·  view source on GitHub ↗

Changes the viewport size. Args: width: Viewport width, in pixels. height: Viewport height, in pixels.

(self, width, height)

Source from the content-addressed store, hash-verified

623 self._screen_size = mujoco.MjrRect(0, 0, width, height)
624
625 def set_size(self, width, height):
626 """Changes the viewport size.
627
628 Args:
629 width: Viewport width, in pixels.
630 height: Viewport height, in pixels.
631 """
632 self._screen_size.width = width
633 self._screen_size.height = height
634
635 def screen_to_viewport(self, screen_coordinates):
636 """Converts screen coordinates to viewport coordinates.

Callers 3

tickMethod · 0.80
setUpMethod · 0.80
test_aspect_ratioMethod · 0.80

Calls

no outgoing calls

Tested by 2

setUpMethod · 0.64
test_aspect_ratioMethod · 0.64