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

Scribble equivalent of string_width and string_height #54

Closed
brady-goldsworthy opened this issue May 3, 2020 · 3 comments
Closed

Scribble equivalent of string_width and string_height #54

brady-goldsworthy opened this issue May 3, 2020 · 3 comments
Labels

Comments

@brady-goldsworthy
Copy link

brady-goldsworthy commented May 3, 2020

I'm curious if there's a way to get the width and height of a string that would be drawn using scribble_draw. Something like the build in string_width and string_height functions, but using the scribble draw state.

Is there a way to do this? If not, consider this to be a possible feature request :)

@DragoniteSpam
Copy link

You can use scribble_get_quad or scribble_get_bbox to get the bounds of a scribble element.

A higher-level way to get the dimensions would be nice, all you really need to do for that is get the left and bottom bounds of the array for width and height, though.

@brady-goldsworthy
Copy link
Author

That's exactly what I was looking for, thank you! Closing this as my question was answered.

@JujuAdams
Copy link
Owner

I can add width/height to the output array (/struct in the future?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants