hoffstadt / hoffstadt/DearPyGui

get_item_rect_size for plot annotations?

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

Description

**Is your feature request related to a problem? Please describe.**
I'm trying to distribute a large amount of plot annotations dynamically in such a way that they don't overlap - and for that, I need the pixel sizes of the annotations. However, get_item_rect_size gives me a KeyError: 'rect_size', as the item_state dict is just {'ok': True, 'pos': [0, 0]}.
**Describe the solution you'd like**
Would be great to have get_item_rect_size working for annotations.

**Describe alternatives you've considered**
Is it possible to get the character heights/widths from the font textures directly? I assume those textures are saved somewhere explicitly, but I have no idea how to get them.

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.