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: draw_ellipse/draw_polyline broken #1425 #1430

Merged
merged 1 commit into from
Nov 18, 2021
Merged

Conversation

hoffstadt
Copy link
Owner

  • Fixed issue with draw_ellipse
  • Fixed same issue with draw_polyline.

There was also a mistake in the ellipse calculation.

This example:

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport(title='Ellipse', width=400, height=400)
dpg.setup_dearpygui()

with dpg.viewport_drawlist(front=True, tag='vpf'):
    dpg.draw_rectangle((100,100), (400,200))
    dpg.draw_ellipse((100,100), (400,200))

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()

Should look like this:
image

But looked like this instead:
image

We just needed to divide the widths and heights in the equation.

@hoffstadt hoffstadt added category: drawings related to drawing API priority: high high priority type: bug bug labels Nov 18, 2021
@hoffstadt hoffstadt merged commit da71b60 into master Nov 18, 2021
@hoffstadt hoffstadt deleted the draw_ellipse_fix branch November 18, 2021 12:29
@hoffstadt hoffstadt restored the draw_ellipse_fix branch November 18, 2021 14:26
@hoffstadt hoffstadt deleted the draw_ellipse_fix branch November 18, 2021 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: drawings related to drawing API priority: high high priority type: bug bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant