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

[hiccup-canvas] Text with colored background #231

Open
prescientmoon opened this issue Jul 5, 2020 · 0 comments
Open

[hiccup-canvas] Text with colored background #231

prescientmoon opened this issue Jul 5, 2020 · 0 comments

Comments

@prescientmoon
Copy link
Contributor

There should be a way to specify a background color for text.

Note: The text needs to be re-measured when either the font or the actual text changes. So I think we could have 2 attributes (eg: __lastText and __lastFont), and only re-measure when one of those isn't in sync with the actual data.

I don't know what a good name for the background color attribute would be (backgroundFill?).
In my self-implemented version I also have some padding for the background, so an attribute for that would be nice as well.

Would this be a good addition? If yes I can implement it myself and open a pr.

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