(self, screen_width, screen_height,
            scaling=None, dimensions=None, aspect_ratio=(4, 3), border_width=0,
            **kwargs
        )
Initialise size parameters.
Initialise size parameters.
Initialise size parameters .
def __init__(self, screen_width, screen_height,
            scaling=None, dimensions=None, aspect_ratio=(4, 3), border_width=0,
            **kwargs
        ):
        """Initialise size parameters."""
        # use native pixel sizes
        # i.e. logical pixel boundaries coincide with physical pixel boundaries
        self._force_native_pixel = scaling == 'native'
        # override physical pixel size of window
        self._force_window_size = dimensions
        # canvas aspect ratio
        self._aspect = aspect_ratio
        # border width as a percentage of canvas width
        self._border_pct = border_width
        # the following attributes must be set separately
        # physical pixel size of screen
        self._screen_size = screen_width, screen_height
        # logical pixel size of canvas
        self._canvas_logical = ()
        # physical pixel size of window (canvas+border)
        self._window_size = ()
        # physical pixel size of display (canvas+border+letterbox)
        self._display_size = ()
        # cached calculations
        self._scale = ()
        self._border_shift = ()
        self._letterbox_shift = ()
def __init__ ( self , screen_width , screen_height , scaling = None , dimensions = None , aspect_ratio = ( 4 , 3 ) , border_width = 0 , * * kwargs ) : # use native pixel sizes # i.e. logical pixel boundaries coincide with physical pixel boundaries self . _force_native_pixel = scaling == 'native' # override physical pixel size of window self . _force_window_size = dimensions # canvas aspect ratio self . _aspect = aspect_ratio # border width as a percentage of canvas width self . _border_pct = border_width # the following attributes must be set separately # physical pixel size of screen self . _screen_size = screen_width , screen_height # logical pixel size of canvas self . _canvas_logical = ( ) # physical pixel size of window (canvas+border) self . _window_size = ( ) # physical pixel size of display (canvas+border+letterbox) self . _display_size = ( ) # cached calculations self . _scale = ( ) self . _border_shift = ( ) self . _letterbox_shift = ( )