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

get_item_configuration on draw_polygon fails #2462

Open
v-ein opened this issue Jan 17, 2025 · 0 comments
Open

get_item_configuration on draw_polygon fails #2462

v-ein opened this issue Jan 17, 2025 · 0 comments
Labels
state: pending not addressed yet type: bug bug

Comments

@v-ein
Copy link
Contributor

v-ein commented Jan 17, 2025

Version of Dear PyGui

Version: 2.0.0
Operating System: Windows

My Issue/Question

For polygons created with draw_polygon, the points are not reported correctly by get_item_configuration. If there are 4 or fewer points, it reports a list of NULLs (whatever that means), otherwise it simply fails with an IndexError.

To Reproduce

Steps to reproduce the behavior:

  1. Create a polygon.
  2. Call get_item_configuration.

Expected behavior

Report the actual list of points passed to draw_polygon.

Screenshots/Video

Image

Standalone, minimal, complete and verifiable example

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.setup_dearpygui()
dpg.create_viewport(title=f"Test - {dpg.get_dearpygui_version()}", width=700, height=750)

with dpg.window():
    # This one succeeds, but the "points" entry contains something weird
    print("4 points:")
    poly = dpg.draw_polygon([(x, x) for x in range(4)])
    print(dpg.get_item_configuration(poly))
    # This one fails
    print("5 points:")
    poly = dpg.draw_polygon([(x, x) for x in range(5)])
    print(dpg.get_item_configuration(poly))

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
@v-ein v-ein added state: pending not addressed yet type: bug bug labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet type: bug bug
Projects
None yet
Development

No branches or pull requests

1 participant