diff --git a/DearPyGui/src/Core/AppItems/mvDrawing.cpp b/DearPyGui/src/Core/AppItems/mvDrawing.cpp index 2e69351b3..55b5c5652 100644 --- a/DearPyGui/src/Core/AppItems/mvDrawing.cpp +++ b/DearPyGui/src/Core/AppItems/mvDrawing.cpp @@ -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 }; diff --git a/DearSandbox/Demo.py b/DearSandbox/Demo.py index 72dcc3ef6..7df132612 100644 --- a/DearSandbox/Demo.py +++ b/DearSandbox/Demo.py @@ -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