Skip to content

Commit

Permalink
[LINUX][MAC] Fixed issue hoffstadt#72 canvas drawing images
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Aug 14, 2020
1 parent a688abc commit 4f7502b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DearPyGui/src/Core/AppItems/mvDrawing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ namespace Marvel {
if (m_width == 0) m_width = (int)((float)texture->width * (m_uv_max.x - m_uv_min.x));
if (m_height == 0) m_height = (int)((float)texture->height * (m_uv_max.y - m_uv_min.y));

m_texture = texture->texture;

if (m_autosize)
m_pmax = { (float)m_width + m_pmin.x, (float)m_height + m_pmin.y };

Expand Down
1 change: 1 addition & 0 deletions DearSandbox/Demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def InsertCol(sender, data):
draw_polygon("drawing##widget", ((363, 471), (153, 498), (59, 220), (363, 471)), (255, 125, 0, 255), thickness=1.0, fill=(255, 125, 0, 50))
draw_bezier_curve("drawing##widget", (50, 200), (150, 250), (300, 150), (600, 250), (255, 255, 0, 255), thickness = 2.0)
draw_arrow("drawing##widget", (50, 70), (100, 65), (0, 200, 255), 1, 10)
draw_image("drawing##widget", "C:/dev/DearPyGui/Examples/SpriteMapExample.png", pmin=[200, 200])
end_window()

# asyncronous testing
Expand Down

0 comments on commit 4f7502b

Please sign in to comment.