Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drawtext will return the coordinates of the bounding box of the text #897

Merged
merged 2 commits into from Sep 5, 2023

Conversation

kortenkamp
Copy link
Member

Currently it is very difficult to find out the screen bounds of a text. This small change gives access to the coordinates of the bounding rectangle for a text that has been output through drawtext. I plan to add this to Cinderella classic, too, but right now there is a semantic problem when using several ports. I will discuss this with @richter-gebert soon, but until then it would be nice to use this in production code already.

@strobelm
Copy link
Member

strobelm commented Sep 4, 2023

I will have a look at it asap. Will also add some unit tests.

@strobelm
Copy link
Member

strobelm commented Sep 5, 2023

The code looks good to me, just did a small refactoring to make to code a bit more concise. Unfortunately we do not have an easy way right now to unit test drawing functions.

@strobelm strobelm merged commit 09081be into main Sep 5, 2023
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants