Setting the size of a sketch

To view this guide as an illustrated card click on the image below, or click on the .pdf link.

set up.pdf

How to define the size of your sketch

Type…

void setup() {

size(200, 100);

}

We place a semicolon ; at the end of the size() command to let processing know that the line command has finnished.

Changing the value of the numbers in the brackets will change the width & height of the sketch in pixels.

With Processing, we measure the width and height of the sketch from a starting point at the top left hand corner.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: