DearPyGui
DearPyGui copied to clipboard
draw_rectangle with corner color attributes paints everything white for me
Version of Dear PyGui
Version: 1.11.1 Operating System: Ubuntu 22.04
My Issue/Question
Calling draw_rectangle with multicolor and using the color_* arguments paints the rectangle all white. corner_colors works as expected. This is also seen in the demo.
To Reproduce
Open the demo and expand the "Drawing API / Basic" nodes.
Expected behavior
Individual corner color attributes should behave the same as corner_colors.
Screenshots/Video
Standalone, minimal, complete and verifiable example
if __name__ == "__main__":
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport(title='Demo', width=600, height=600)
dpg.setup_dearpygui()
with dpg.window(width=500, height=500):
with dpg.drawlist(300, 300):
dpg.draw_rectangle((0, 0), (300, 300), multicolor=True, color_bottom_left=[255, 0, 0], color_bottom_right=[0, 255, 0], color_upper_left=[0, 0, 255], color_upper_right=[255, 255, 0])
#dpg.draw_rectangle((0, 0), (300, 300), multicolor=True, corner_colors=[[255, 0, 0], [0, 255, 0], [0, 0, 255], [255, 255, 0]])
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()