ProcessingJoy ——互斥的文字【JAVA】
发布日期:2021-07-01 05:51:30 浏览次数:2 分类:技术文章

本文共 674 字,大约阅读时间需要 2 分钟。

效果图

 

完整代码和注释

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); ///< 将图片置于窗口中

转载地址:https://panda1234lee.blog.csdn.net/article/details/116885570 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:ProcessingJoy ——路径文字【JAVA】
下一篇:ProcessingJoy ——互斥的彩色粒子【JAVA】

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月18日 02时23分22秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章