PGraphics letters;
PGraphics letters2;
PGraphics letters3;
PGraphics letters4;
PGraphics letters5;
PGraphics letters6;
void setup() {
size(5000, 5000);
letters = createGraphics(width, height);
letters2 = createGraphics(width, height);
letters3 = createGraphics(width, height);
letters4 = createGraphics(width, height);
letters5 = createGraphics(width, height);
letters6 = createGraphics(width, height);
}
void draw() {
letters.beginDraw();
letters.textSize(120);
letters.text("A", 0, 100);
letters.endDraw();
letters2.beginDraw();
letters2.textSize(120);
letters2.text("B", 80, 100);
letters2.endDraw();
letters3.beginDraw();
letters3.textSize(120);
letters3.text("C", 140, 100);
letters3.endDraw();
letters4.beginDraw();
letters4.textSize(120);
letters4.text("D", 210, 100);
letters4.endDraw();
letters5.beginDraw();
letters5.textSize(120);
letters5.text("E", 290, 100);
letters5.endDraw();
letters6.beginDraw();
letters6.textSize(120);
letters6.text("F", 350, 100);
letters6.endDraw();
image(letters, 0 , 0);
image(letters2, 0 , 0);
image(letters3, 0 , 0);
image(letters4, 0 , 0);
image(letters5, 0 , 0);
image(letters6, 0 , 0);
}
hi,
well… as you use image here to show the letters, you can play with image parameters, like image(letters,0,0,width/2, height/2);
but, if there is no others reasons, why to use a PGraphics by letter?
and not directly draw what you want:
void setup() {
size(1000, 800);
frameRate(24);
}
void draw() {
background(0);
float stretch=(float)frameCount/10;
textSize(100+20*sin(stretch));
text("A", 0, 100);
textSize(100+20*sin(stretch*2));
text("B", 80, 100);
textSize(100+20*sin(stretch+0.6));
text("C", 140, 100);
textSize(100+20*sin(stretch*2+0.6));
text("D", 210, 100);
textSize(100+20*sin(stretch+1.2));
text("E", 290, 100);
textSize(100+20*sin(stretch*2+1.2));
text("F", 350, 100);
}