Text 有人知道如何在处理过程中设置文本边框的颜色吗
我认为没有Text 有人知道如何在处理过程中设置文本边框的颜色吗,text,processing,Text,Processing,我认为没有textBorder()和笔划()不起作用。有什么帮助吗?我也有同样的问题 您必须打印两个字体大小不同的文本,一个是边框颜色,另一个是填充颜色,稍微小一点 您可以编写一个基本的textWithBorder(…)函数。这是一个非常好的1px笔划,将文本以笔划颜色绘制四次,然后以填充颜色绘制一次: void draw() { textSize(30); textWithBorder("text", 255, 0, 15, 30); } void textWithBorder(S
textBorder()代码>和笔划()代码>不起作用。有什么帮助吗?我也有同样的问题
您必须打印两个字体大小不同的文本,一个是边框颜色,另一个是填充颜色,稍微小一点
您可以编写一个基本的textWithBorder(…)
函数。这是一个非常好的1px笔划,将文本以笔划颜色绘制四次,然后以填充颜色绘制一次:
void draw() {
textSize(30);
textWithBorder("text", 255, 0, 15, 30);
}
void textWithBorder(String string, int strokecolor, int fillcolor, int x, int y) {
fill(strokecolor);
text(string, x-1, y);
text(string, x+1, y);
text(string, x, y-1);
text(string, x, y+1);
fill(fillcolor);
text(string, x, y);
}