jupylet/app.py
def scale_window_to(self, px):
        """Scale window size so that its bigges dimension (either width or height)
        is px pixels.

        This is useful for RL applications since smaller windows render faster.
        """
        assert self.mode not in ['jupyter', 'both'], 'Cannot rescale window in Jupyter mode.'
        assert self.event_loop.is_running, 'Window can only be scaled once app has been started.'

        width0 = self.window.width
        height0 = self.window.height
        
        scale = px / max(width0, height0)

        self.window.width = round(scale * width0)
        self.window.height = round(scale * height0)

        sx = self.window.width / width0
        sy = self.window.height / height0

        pyglet.gl.glScalef(sx, sy, scale)
Scale window size so that its bigges dimension (either width or height)
        is px pixels.

        This is useful for RL applications since smaller windows render faster.
        
Scale window size so that its bigges dimension (either width or height)
is px pixels.

This is useful for RL applications since smaller windows render faster.
Scale window size so that its bigges dimension ( either width or height ) is px pixels . This is useful for RL applications since smaller windows render faster .
def scale_window_to(self, px):
        assert self.mode not in ['jupyter', 'both'], 'Cannot rescale window in Jupyter mode.'
        assert self.event_loop.is_running, 'Window can only be scaled once app has been started.'
        width0 = self.window.width
        height0 = self.window.height
        scale = px / max(width0, height0)
        self.window.width = round(scale * width0)
        self.window.height = round(scale * height0)
        sx = self.window.width / width0
        sy = self.window.height / height0
        pyglet.gl.glScalef(sx, sy, scale)
def scale_window_to ( self , px ) : assert self . mode not in [ 'jupyter' , 'both' ] , 'Cannot rescale window in Jupyter mode.' assert self . event_loop . is_running , 'Window can only be scaled once app has been started.' width0 = self . window . width height0 = self . window . height scale = px / max ( width0 , height0 ) self . window . width = round ( scale * width0 ) self . window . height = round ( scale * height0 ) sx = self . window . width / width0 sy = self . window . height / height0 pyglet . gl . glScalef ( sx , sy , scale )
Scale window size so that its bigges dimension (either width or height)
is px pixels.
Scale window size so that its bigges dimension ( either width or height ) is px pixels .
"""Scale window size so that its bigges dimension (either width or height)
        is px pixels.

        This is useful for RL applications since smaller windows render faster.
        """
self
px