Open
Description
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:
- Create a polygon.
- Call
get_item_configuration
.
Expected behavior
Report the actual list of points passed to draw_polygon
.
Screenshots/Video
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()