DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

draw_rectangle with corner color attributes paints everything white for me

Open ndahn opened this issue 7 months ago • 0 comments

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

image

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()

ndahn avatar Jun 28 '24 14:06 ndahn