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()
false
loop()
new
noLoop()
redraw()
return
setup()
size()
true
void
{} (curly braces)



Environment

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



Data

Primitive
boolean
byte
char
color
float
int

Composite
Array
Object
String

Conversion
boolean()
byte()
char()
float()
int()
str()





Control

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

Iteration
for()
while()

Conditionals
else
if()

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



Shape

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

Curves
bezier()
curve()


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

Vertex
beginShape()
bezierVertex()
curveVertex()
endShape()
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()




Output

Text Area
print()
println()

Image
save()
saveFrame()

Files
saveBytes()
saveStrings()



Transform

popMatrix()
pushMatrix()
rotate()
scale()
translate()





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)


Calculation
abs()
ceil()
constrain()
dist()
floor()
max()
min()
pow()
round()
sq()
sqrt()

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

Random
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