Does canvas
support background color when draw text? How to set Paint
#898
Unanswered
OliverChao
asked this question in
Q&A
Replies: 1 comment
-
Your question is not entirely clear to me. I'll answer based on assumptions: You can set any color to draw text, but I don't think there is a way to fill the background of the text. This has to be done by measuring the covered area of the text first and then drawing the background (as a number of filled rectangles for example) first before drawing the actual text. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I checked the
canvas
specification and it usesPaint
to draw.If there one way to set
Paint
to draw text with the background color?I am fresh to this project and need some help.
Beta Was this translation helpful? Give feedback.
All reactions