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

draw_rectangle with corner color attributes paints everything white for me #2352

Open
ndahn opened this issue Jun 28, 2024 · 0 comments
Open
Labels
state: pending not addressed yet type: bug bug

Comments

@ndahn
Copy link

ndahn commented Jun 28, 2024

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 ndahn added state: pending not addressed yet type: bug bug labels Jun 28, 2024
@ndahn ndahn changed the title draw_rectangle with multicolor paints everything white for me Jun 28, 2024
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
1 participant