如何在背景随文本一起扩散的画布上使custon可编辑文本框?

问题描述

我并没有在画布上使用浮动控件,但是我认为可以通过画布来实现图像中的编辑文本框。背景随着文本长度而扩展,如果一行中的文本长度为0,则没有背景。

如果您有任何代码或建议,请提供帮助。

trying to create

解决方法

enter image description here

代码在这里:

[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,以用您选择的颜色填充所有文本。

尝试使用它,以便最终获得更准确的结果。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...