-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
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
The behaviour of runApp
with wrong sized canvas is strange
#13
Comments
runApp
with odd sized canvas is strange
runApp
with odd sized canvas is strange runApp
with wrong sized canvas is strange
Hi @kfl! I believe the first instance happens when you try to buffer a frame (canvas), from the draw function, that is larger than the given height Your example demonstrates this point well. You parse I believe the second instance occurs because swapping the height and width will mess with the pitch calculations for A possible solution will be to calculate our buffer size from the first frame from I attempted to fix this issue, and I created a PR with my proposed solution. |
No longer relevant in version 2.0 |
If the
draw
argument forrunApp
returns a canvas that's to small or to big wrt the given arguments, the result is strange.For instance, the following program:
Will give an
System.ArgumentException: Destination array was not long enough
error.Likewise, the following program:
Where the
width
andheight
arguments torunApp
are swapped, results in garbled output.The text was updated successfully, but these errors were encountered: