问题描述
我并没有在画布上使用浮动控件,但是我认为可以通过画布来实现图像中的编辑文本框。背景随着文本长度而扩展,如果一行中的文本长度为0,则没有背景。
如果您有任何代码或建议,请提供帮助。
解决方法
代码在这里:
[0 0 0] : take nothing from all lists.
[1 0 0] : take 1 from A and nothing from B and C.
[2 0 0]
[3 0 0]
[4 0 0]
[0 1 0] : take 1 from B and nothing from A and C.
[2 1 0] : take 2 from A and 1 from B and nothing from C. ([1 1 0] is not the case)
[3 1 0] [4 1 0]
[0 2 0] [1 2 0] [3 2 0] [4 2 0]
[0 0 2] [1 0 2] [3 0 2] ...
strokeWidth应该大于fontSize,以用您选择的颜色填充所有文本。
尝试使用它,以便最终获得更准确的结果。