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

Fix circle rendering #106

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Fix circle rendering #106

merged 1 commit into from
Mar 9, 2023

Conversation

smarq8
Copy link
Contributor

@smarq8 smarq8 commented Mar 5, 2023

very first update 'd' assume 'x=0' and 'y=r' so we can not change them before updating 'd'. I know over internet we can found different versions so I manually checked it on a paper and it seems right.

very first update 'd' assume 'x=0' and 'y=r' so we can not change them before updating 'd'. I know over internet we can found different versions so I manually checked it on a paper and it seems right.
@tuupola
Copy link
Owner

tuupola commented Mar 9, 2023

Excellent. I did not notice before that circles were slightly malformed. This can be quite clearly seen in the smaller radius circles. Attached rendering by original master and after your patch. Thanks!

circle-master
circle-patch

@tuupola tuupola changed the title incorrect hagl_draw_circle implementation Fix circle rendering Mar 9, 2023
@tuupola tuupola merged commit 42016a8 into tuupola:master Mar 9, 2023
@tuupola
Copy link
Owner

tuupola commented Mar 9, 2023

Seems filled circle needs some adjusting too. Image generated with:

hagl_draw_circle(backend, DISPLAY_WIDTH / 2, DISPLAY_WIDTH / 2, 300, red);
hagl_fill_circle(backend, DISPLAY_WIDTH / 2, DISPLAY_WIDTH / 2, 300, blue);

fill-circle

@smarq8 smarq8 deleted the patch-2 branch March 9, 2023 16:27
smarq8 added a commit to smarq8/hagl that referenced this pull request Mar 11, 2023
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

Successfully merging this pull request may close these issues.

2 participants