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)
super
setup()
exit()
class
void
size()
/* */ (multiline comment)
false
noLoop()
this
true
new
// (comment)
, (comma)
delay()
{} (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()
splitTokens()
nf()
match()

##### Array Functions

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

##### Relational Operators

< (less than)
>= (greater than or equal to)
== (equality)
> (greater than)
<= (less than or equal to)
!= (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

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

##### Setting

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

##### Creating & Reading

blendColor()
red()
brightness()
blue()
saturation()
green()
hue()
alpha()
color()
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

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

##### Calculation

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

##### Trigonometry

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

##### Random

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