Difference between revisions of "GSDP:GAM100/CProcessing/size()"
From Inside
< GSDP:GAM100 | CProcessing
>Zachary.logsdon |
>Zachary.logsdon |
||
Line 19: | Line 19: | ||
// Set the background to white | // Set the background to white | ||
− | background(255, 255, 255, 255); | + | background(color(255, 255, 255, 255)); |
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 13:07, 5 October 2019
size()
Description
The function size() modifies the size of the window. Typically, the window size is set in the init function.
Parameters
size(width, height)
- width - (int) the width to set the window to
- height - (int) the height to set the window to
Example
void init()
{
// Set the window size to a small square
size(10, 10);
// Set the background to white
background(color(255, 255, 255, 255));
}