FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
 
  Language (API). The Processing Language has been designed to facilitate the creation of sophisticated visual and conceptual structures.
 
 
Viewing Options:


Languages:



The abridged reference omits description and functions for drawing in 3D and for detailed drawing and data manipulation. The complete reference documents every aspect of the core processing software.



Structure

() (parentheses)
, (comma)
. (dot)
/* */ (multiline comment)
/** */ (doc comment)
// (comment)
; (semicolon)
= (assign)
[] (array access)
class
delay()
draw()
extends
false
implements
loop()
new
noLoop()
null
redraw()
return
setup()
size()
this
true
void
{} (curly braces)



Environment

cursor()
focused
frameCount
framerate
framerate()
height
noCursor()
online
screen
width



Data

Primitive
boolean
byte
char
color
float
int

Composite
Array
Object
String

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

String Functions
join()
nf()
nfc()
nfp()
nfs()
split()
trim()

Array Functions
append()
arraycopy()
concat()
contract()
expand()
reverse()
shorten()
sort()
splice()
subset()



Control

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

Iteration
for()
while()

Conditionals
?: (conditional)
break
case
default
else
if()
switch()

Logical Operators
! (logical NOT)
&& (logical AND)
|| (logical OR)



Shape

2D Primitives
arc()
ellipse()
line()
point()
quad()
rect()
triangle()

Curves
bezier()
bezierDetail()
bezierPoint()
bezierTangent()
curve()
curveDetail()
curvePoint()
curveTightness()

3D Primitives
box()
sphere()
sphereDetail()

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

Vertex
beginShape()
bezierVertex()
curveVertex()
endShape()
texture()
textureMode()
vertex()



Input

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

Keyboard
key
keyCode
keyPressed
keyPressed()
keyReleased()

Time & Date
day()
hour()
millis()
minute()
month()
second()
year()

Files
loadBytes()
loadStrings()
open()
openStream()

Web
link()
param()
status()



Output

Text Area
print()
println()

Image
save()
saveFrame()

Files
saveBytes()
saveStrings()



Transform

applyMatrix()
popMatrix()
printMatrix()
pushMatrix()
resetMatrix()
rotate()
rotateX()
rotateY()
rotateZ()
scale()
translate()



Lights & Camera

Lights
ambientLight()
directionalLight()
lightFalloff()
lightSpecular()
lights()
normal()
pointLight()
spotLight()

Camera
beginCamera()
camera()
endCamera()
frustum()
ortho()
perspective()
printCamera()
printProjection()



Color

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

Creating & Reading
alpha()
blue()
brightness()
color()
green()
hue()
red()
saturation()



Image

PImage

Loading & Displaying
image()
imageMode()
loadImage()
noTint()
tint()

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



Typography

PFont

Loading & Displaying
createFont()
loadFont()
text()
textFont()

Attributes
textAlign()
textLeading()
textMode()
textSize()
textWidth()



Math

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

Bitwise Operators
& (bitwise AND)
<< (left shift)
>> (right shift)
| (bitwise OR)

Calculation
abs()
ceil()
constrain()
dist()
exp()
floor()
lerp()
log()
mag()
max()
min()
pow()
round()
sq()
sqrt()

Trigonometry
acos()
asin()
atan()
atan2()
cos()
degrees()
radians()
sin()
tan()

Random
noise()
noiseDetail()
noiseSeed()
random()
randomSeed()



Constants

HALF_PI (1.57079...)
PI (3.14159...)
TWO_PI (6.28318...)



Sound

PSound

Loading
loadSound()



 
 







   
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info