DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

`dpg.group` adds empty pixels

Open QuattroMusic opened this issue 3 years ago • 0 comments

Version of Dear PyGui

Version: 1.6.2 Operating System: Windows 10

My Issue/Question

When using dpg.group(), it adds some dead pixels

To Reproduce

Execute the code below

Screenshots/Video

image

Standalone, minimal, complete and verifiable example

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window():
    dpg.set_primary_window(dpg.last_item(), True)
    # creating a texture
    blackSquare = [[0, 0, 0, 1] for _ in range(32)]
    purpleSquare = [[0.6, 0, 1, 1] for _ in range(32)]
    rawData = (blackSquare + purpleSquare + blackSquare + purpleSquare) * 16 + (purpleSquare + blackSquare + purpleSquare + blackSquare) * 16
    data = [x for xs in rawData for x in xs]

    with dpg.texture_registry():
        dpg.add_static_texture(width=64, height=64, default_value=data, tag="texture_tag")

    for x in range(6):
        # increment the above number in the for loop, and check the bottom spacing!
        # as a second thing, try to remove the `dpg.group()`
        with dpg.group():
            for y in range(12):
                dpg.add_image("texture_tag", pos=[x * 64, y * 64])


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

QuattroMusic avatar Jul 09 '22 19:07 QuattroMusic