ProcessingJoy ——互斥的文字JAVA
Posted panda1234lee
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ProcessingJoy ——互斥的文字JAVA相关的知识,希望对你有一定的参考价值。
效果图
完整代码和注释
String wordStr = "ProcessingJoy " + "ShaderJoy " + "ProcessingJoy " + "ShaderJoy ";
char[] words = wordStr.toCharArray();
color colors[] = {#000000, #ffffff};
PFont font;
PImage img;
void preload() {
font = createFont("cmb10.ttf", 30);
img = loadImage("../../Images/1.jpeg");
img.resize(362, 512);
}
void setup() {
size(640, 512);
preload();
textFont(font);
textAlign(CENTER);
}
void draw() {
background(#ebebeb);
float fontSizeVal = 50; ///< 字体大小
float horSpaceVal = 40; ///< 字符水平固定间距
float horOffsetVal = 80; ///< 不同高度在水平上的偏移量
textSize(fontSizeVal);
image(img, (width/2)-(img.width/2), height/2-(img.height/2), img.width, img.height); ///< 将图片置于窗口中
以上是关于ProcessingJoy ——互斥的文字JAVA的主要内容,如果未能解决你的问题,请参考以下文章