import processing.core.*; import processing.data.*; import processing.event.*; import processing.opengl.*; import controlP5.*; import java.util.HashMap; import java.util.ArrayList; import java.io.File; import java.io.BufferedReader; import java.io.PrintWriter; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; public class sketch_220131f extends PApplet { int strokeW = 30; int xHeight = 60; //xHeight is the height of the letter //grow vertically ControlP5 cp5; PFont font; public void setup(){ /* size commented out by preprocessor */; /* pixelDensity commented out by preprocessor */; cp5 = new ControlP5(this); font = createFont("notosans.otf", 120); cp5.addSlider("xHeight") .setPosition(100,100) .setRange(0,180) ; } public void draw(){ background(150); textFont(font, 120); text("ni", 10, 50); push(); translate(150, 150); fill(0); rectMode(CORNERS); rect(0, 50-xHeight, 130-strokeW, 50+strokeW-xHeight); rect(0, 110-xHeight,130,110+strokeW-xHeight); rect(strokeW, 210-strokeW, 130, 210); rect(0, 110-xHeight, strokeW, 210-strokeW); rect(130-strokeW, 50+strokeW-xHeight, 130, 210); pop(); } public void settings() { size(960, 500); pixelDensity(displayDensity()); } static public void main(String[] passedArgs) { String[] appletArgs = new String[] { "sketch_220131f" }; if (passedArgs != null) { PApplet.main(concat(appletArgs, passedArgs)); } else { PApplet.main(appletArgs); } } }