hoffstadt / hoffstadt/DearPyGui

draw_polygon outlines appear incorrect

Open
#753 1 comment 0 reactions 0 assignees View on GitHub
category: drawings priority: medium type: bug type: improvement
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 0.6.294
Operating System: macOS 10.15.7 & Windows 10 (both with same issue)

## My Issue/Question

The outlines using `draw_polygon` do not appear to be drawing correctly. Also, if you draw the same polygon using `draw_triangle` they do not match each other.

## Expected behavior

I think the outlines should be uniform thickness. I would also think that the polygon output and triangle output would be the same. The triangle output corners look better than the polygon but still not uniform (cool stylistic option but I don't think that is the intention).

## Screenshots/Video

![poly_issue](https://user-images.githubusercontent.com/1454335/112721314-d13d7000-8ec8-11eb-8a32-c4f884db4ece.jpg)

Note that the poly triangle fill also gets cut off on the right part in addition to the outline issues.

Note, if you set the `thickness=0` the two drawings still do not look the same. The polygon looks more ragged.

## Standalone, minimal, complete and verifiable example

```python
from dearpygui.core import *
from dearpygui.simple import *

w,h = 500, 500
with window("tri", width=w, height=h):
set_window_pos("tri", 0,0)
add_drawing("d1", width=w, height=h)
draw_triangle("d1", [100,150], [100, 400], [450, 200], color=[255, 255, 255, 255], fill=[255, 0,0,255], thickness=20)

with window("poly", width=w, height=h):
set_window_pos("poly", w, 0)
add_drawing("d2", width=w, height=h)
draw_polygon("d2", [[100,150], [100, 400], [450, 200], [100,150]], color=[255, 255, 255, 255], fill=[255, 0,0,255], thickness=20)

start_dearpygui()
```

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.