Skip to content
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

Error with line drawing #18

Open
josuah opened this issue Jul 14, 2023 · 3 comments
Open

Error with line drawing #18

josuah opened this issue Jul 14, 2023 · 3 comments

Comments

@josuah
Copy link

josuah commented Jul 14, 2023

Thank you to @rezolf who submitted that detailed reproducer
https://discord.com/channels/963222352534048818/1129289344834883594/1129353768346079342

This can be reproduced with the latest firmware release from Brilliant as below:

import display

#  a X on the display, and some more line drawing

# Left Down to Right Up
l1 = display.Line(0,0,639,399, display.GREEN)
# Left Up to Right Down
l2 = display.Line(0, 399, 639, 0, display.GREEN)
#  Vertical middle 
l3 = display.Line(319,0,319,399, display.RED)
#  Horzontal middle 
l4 = display.Line(0,199,639,199, display.RED)

# draw Left down to Right up (works)
display.show(l1)

# draw Left Up, Right down (works)
display.show(l2)

# draw X, (Fails, Nothing on screen)
display.show(l1,l2)

# Left Down to Right Up and Vertical (Works)
display.show(l1,l3)

# Left Down to Right Up and Horizontal (Fails, on lower part of screen)
display.show(l1,l4)

I will try to provide equivalent raw libvgr2d calls today.

@josuah
Copy link
Author

josuah commented Jul 16, 2023

This under ongoing debugging through this patch: #16.

@josuah
Copy link
Author

josuah commented Jul 17, 2023

[EDIT: this is all due to the vgrs.py tool made that ignored the 16x resolution and blending, this has been fixed since then. This message can be ignored.]

original message
# draw Left down to Right up (works)
display.show(l1)

vgrs
Looking fine, maybe a bit too thick at the bottom...


# draw Left Up, Right down (works)
display.show(l2)

vgrs
Looking fine, maybe a few lines missing at the bottom...


# draw X, (Fails, Nothing on screen)
display.show(l1,l2)

vgrs
Looking mostly fine, although the top-right part of the 'X' is offset by what seems to be the line thickness of the left branch of the 'X', and overflows (as seen on the top left corner having the tip of the top right branch).


# Left Down to Right Up and Vertical (Works)
display.show(l1,l3)

vgrs
Here we can clearly see the offset.


# Left Down to Right Up and Horizontal (Fails, on lower part of screen)
display.show(l1,l4)

vgrs
This bug might be unrelated, maybe some bug in my software renderer for RVGR...

@josuah
Copy link
Author

josuah commented Jul 17, 2023

# draw Left down to Right up (works)
display.show(l1)

vgrs
mpv-shot0001
Looking fine.


# draw Left Up, Right down (works)
display.show(l2)

vgrs
mpv-shot0002
Looking fine.


# draw X, (Fails, Nothing on screen)
display.show(l1,l2)

vgrs
mpv-shot0003
Looking fine on simulation, although the top-right part of the 'X' is possibly a bit too far off the right edge?
[EDIT: apparently not]


# Left Down to Right Up and Vertical (Works)
display.show(l1,l3)

vgrs
mpv-shot0004
Looking fine.


# Left Down to Right Up and Horizontal (Fails, on lower part of screen)
display.show(l1,l4)

vgrs
mpv-shot0005
(mind that the photo is turned upside down)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant