images and text

When you save your sketch it creates it's own folder. You need to create a "data" folder within this sketch folder. Then you to save your images and your font into this data folder.

step 1. Save your sketch.
step 2. Go Sketch - show sketch folder (apple - K)
step 3. create a data folder.
if you are using images, move the images into this folder. If you're using fonts there's more to do.
step 4. Go Tools - Create Font
The newly created font will go into the data folder.
Okay now you're ready to start.

First up, put an image on the screen


PImage cheese; // create an image variable called cheese
void setup(){
size (200, 200);
cheese = loadImage("cheese.png"); // the picture cheese.png must be in your data folder.
}
void draw(){
image(cheese, 0, 0); // draw image (image, x, y)
}

Drawing with cheese! woo hoo!
PImage cheese;
void setup(){
size (200, 200);
cheese = loadImage("cheese.png");
void draw(){
noCursor();// hides the cursor
imageMode(CENTER); // changes the location of the image to the center
image(cheese, mouseX, mouseY); // draw image at the mouse location
}

fonts work much the same way.

PImage cheese;
PFont font; // create a font variable
void setup(){
size (200, 200);
cheese = loadImage("cheese.png");
font = loadFont("SynchroLET-24.vlw"); // make sure the font is in your data folder! and that you've spelled it correctly
textFont(font, 24);
}
void draw(){
smooth();
noCursor();// hides the cursor
imageMode(CENTER);
image(cheese, mouseX, mouseY);
fill(1);
text("cheese", 30, 50); // the numbers are the location.
}