hoffstadt / hoffstadt/DearPyGui

draw_polygon within a plot, draws the edges correctlly, but fill in wrong place

Open
#2,045 0 comments 1 reaction 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 1.8.0
Operating System: Windows 10

## My Issue/Question

draw_polygon within a plot, draw the edges correctlly, but fill in wrong place:

```python
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport(title='overlay',vsync=False)
dpg.setup_dearpygui()

p1 = [0,0]
p2 = [100,0]
p3 = [100,100]
p4 = [0,100]
p5 = [0,0]

with dpg.window(label="About2",no_background=False):
with dpg.plot(label="", height=400, width=400) as plot:
dpg.add_plot_legend()
dpg.add_plot_axis(dpg.mvXAxis, label="x")
dpg.add_plot_axis(dpg.mvYAxis, label="y")
color = (255, 0, 0)
dpg.draw_polygon([p1, p2, p3, p4, p5], fill=color, color=color, thickness=1)

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```

![image](https://user-images.githubusercontent.com/826871/221073736-edfc01dd-6e9c-43d9-8ba2-4d53a194e4ee.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.