umbrella icon indicating copy to clipboard operation
umbrella copied to clipboard

[hiccup-canvas] Text with colored background

Open prescientmoon opened this issue 5 years ago • 0 comments

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.

prescientmoon avatar Jul 05 '20 11:07 prescientmoon