-
-
Notifications
You must be signed in to change notification settings - Fork 53
Make the triangle example simpler #810
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
base: main
Are you sure you want to change the base?
Changes from all commits
a8efa5a
dbdd243
3d65f3c
3230cbe
42f52c6
d11ba23
4bedb4e
31510ad
58d2593
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,9 +16,9 @@ | |
| from rendercanvas.offscreen import RenderCanvas | ||
|
|
||
| try: | ||
| from .triangle import setup_drawing_sync | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... and problems we missed. I ran this locally and got a messed up image. As I was on main for rendercanvas I had to go back to v2.5.0 to get it to work again. Didn't bisect it fully but between v2.5.0 and v2.6.0 is what I could find on the quick. I suspect something about the bitorder might be wrong:
I will check the rendercanvas code when I find time. Maybe a numpy kwargs is all we need
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe width/height reversed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wasn't it. I tried around with different shapes and all. But the individual pixel values don't make sense. I think it's somewhere in the new bitmapcontext in rendercanvas. I had a quick glance and it looked like it always writes bytes as uint8... so it could also be a platform specific problem with order across bytes. I will try some variations and file this for rendercanvas hopefully in a few days. |
||
| from .cube import setup_drawing_sync | ||
| except ImportError: | ||
| from triangle import setup_drawing_sync | ||
| from cube import setup_drawing_sync | ||
|
|
||
|
|
||
| canvas = RenderCanvas(size=(640, 480), pixel_ratio=2) | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disabled this and removed the screenshot. Since we get one for cube and one for triangle anyway. Perhaps not the best idea as we could miss problems