Search processing.org:

#

You are viewing the Abridged Reference. It omits description and functions for drawing in 3D and for detailed drawing and data manipulation. Click Extended above to view additional reference.

Structure
. (dot)
setup()
void
class
size()
/* */ (multiline comment)
false
noLoop()
this
true
new
// (comment)
, (comma)
delay()
super
exit()
{} (curly braces)
/** */ (doc comment)
draw()
loop()
implements
redraw()
; (semicolon)
[] (array access)
extends
null
() (parentheses)
return
= (assign)
Environment
frameRate()
noCursor()
frameRate
screen
width
height
frameCount
cursor()
Data

##### Primitive

color
char
float
int
boolean
byte

##### Composite

String
Array
Object

##### Conversion

unbinary()
char()
int()
hex()
binary()
unhex()
byte()
str()
boolean()
float()

##### String Functions

split()
nf()
match()
splitTokens()

##### Array Functions

shorten()
concat()
subset()
append()
sort()
arraycopy()
reverse()
splice()
expand()
Control

##### Relational Operators

< (less than)
>= (greater than or equal to)
<= (less than or equal to)
== (equality)
> (greater than)
!= (inequality)

##### Iteration

for
while

##### Conditionals

break
switch()
case
else
if

##### Logical Operators

|| (logical OR)
&& (logical AND)
! (logical NOT)
Shape

##### 2D Primitives

triangle()
line()
arc()
point()
quad()
ellipse()
rect()

##### Curves

curve()
bezier()

##### Attributes

strokeWeight()
smooth()
strokeJoin()
noSmooth()
ellipseMode()
rectMode()
strokeCap()

##### Vertex

vertex()
bezierVertex()
beginShape()
curveVertex()
endShape()
Input

##### Mouse

mouseDragged()
mouseMoved()
mouseButton
mouseX
mouseReleased()
pmouseX
mousePressed()
mouseY
mousePressed
pmouseY

##### Keyboard

keyCode
keyReleased()
keyPressed()
key
keyPressed

##### Files

loadStrings()
loadBytes()

##### Time & Date

hour()
millis()
year()
minute()
month()
day()
second()
Output

##### Text Area

println()
print()

##### Image

saveFrame()
save()

##### Files

saveStrings()
saveBytes()
PrintWriter
beginRecord()
endRecord()
createWriter()
createReader()
Transform
printMatrix()
pushMatrix()
scale()
popMatrix()
translate()
resetMatrix()
rotate()
Color

##### Setting

background()
colorMode()
stroke()
noFill()
noStroke()
fill()

##### Creating & Reading

red()
brightness()
blue()
saturation()
green()
hue()
alpha()
color()
blendColor()
Image
PImage

##### Loading & Displaying

loadImage()
image()
noTint()
imageMode()
tint()

##### Pixels

filter()
copy()
set()
updatePixels()
blend()
loadPixels()
pixels[]
get()
Typography
PFont

##### Loading & Displaying

text()
loadFont()
textFont()

##### Attributes

textSize()
textAlign()
textLeading()
textWidth()
Math

##### Operators

+ (addition)
-= (subtract assign)
- (minus)
% (modulo)
+= (add assign)
/ (divide)
* (multiply)
++ (increment)
-- (decrement)

##### Calculation

min()
max()
round()
dist()
pow()
floor()
sqrt()
abs()
constrain()
lerp()
sq()
ceil()
norm()
map()

##### Trigonometry

tan()
sin()
cos()
degrees()
atan2()
radians()

##### Random

randomSeed()
random()
Constants
HALF_PI (1.57079...)
TWO_PI (6.28318...)
PI (3.14159...)