We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In some cases pygame.display.set_mode() will return a size different to the one requested for reasons other than scaling. This can cause a crash:
Traceback (most recent call last): File "pingplot.py", line 16, in <module> scene = w2d.Scene(150, 100, title="Ping plot") File "C:\WorkFolders\mauve\My Documents\dev\pingplot\venv\lib\site-packages\wasabi2d\scene.py", line 94, in __init__ ctx = self.ctx = self._make_context(width, height) File "C:\WorkFolders\mauve\My Documents\dev\pingplot\venv\lib\site-packages\wasabi2d\scene.py", line 176, in _make_context self.drawer = self._make_scaler(ctx, (width, height)) File "C:\WorkFolders\mauve\My Documents\dev\pingplot\venv\lib\site-packages\wasabi2d\scene.py", line 185, in _make_scaler }[self._scaler] KeyError: False
(I added some debug output. It turns out that this is because Windows has a certain minimum window width in order to fit the title bar controls.)
Traceback (most recent call last): File "pingplot.py", line 16, in <module> scene = w2d.Scene(150, 100, title="Ping plot") File "C:\WorkFolders\mauve\My Documents\dev\pingplot\venv\lib\site-packages\wasabi2d\scene.py", line 94, in __init__ ctx = self.ctx = self._make_context(width, height) File "C:\WorkFolders\mauve\My Documents\dev\pingplot\venv\lib\site-packages\wasabi2d\scene.py", line 176, in _make_context self.drawer = self._make_scaler(ctx, (width, height)) File "C:\WorkFolders\mauve\My Documents\dev\pingplot\venv\lib\site-packages\wasabi2d\scene.py", line 183, in _make_scaler f"No scaler set but display size {self._real_size} != " KeyError: 'No scaler set but display size (176, 100) != requested size (150, 100)'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In some cases pygame.display.set_mode() will return a size different to the one requested for reasons other than scaling. This can cause a crash:
(I added some debug output. It turns out that this is because Windows has a certain minimum window width in order to fit the title bar controls.)
The text was updated successfully, but these errors were encountered: