PApplet
static float
abs(float n)
( begin auto-generated from abs.xml ) Calculates the absolute value (magnitude) of a number.
static int
abs(int n)
static float
acos(float value)
( begin auto-generated from acos.xml ) The inverse of cos(), returns the arc cosine of a value.
float
alpha(int rgb)
( begin auto-generated from alpha.xml ) Extracts the alpha value from a color.
void
ambient(float gray)
void
ambient(float v1,
float v2,
float v3)
void
ambient(int rgb)
( begin auto-generated from ambient.xml ) Sets the ambient reflectance for shapes drawn to the screen.
void
ambientLight(float v1,
float v2,
float v3)
( begin auto-generated from ambientLight.xml ) Adds an ambient light.
void
ambientLight(float v1,
float v2,
float v3,
float x,
float y,
float z)
static byte[]
append(byte[] array,
byte value)
( begin auto-generated from append.xml ) Expands an array by one element and adds data to the new position.
static char[]
append(char[] array,
char value)
static float[]
append(float[] array,
float value)
static int[]
append(int[] array,
int value)
static java.lang.Object
append(java.lang.Object array,
java.lang.Object value)
static java.lang.String[]
append(java.lang.String[] array,
java.lang.String value)
void
applyMatrix(float n00,
float n01,
float n02,
float n10,
float n11,
float n12)
void
applyMatrix(float n00,
float n01,
float n02,
float n03,
float n10,
float n11,
float n12,
float n13,
float n20,
float n21,
float n22,
float n23,
float n30,
float n31,
float n32,
float n33)
void
applyMatrix(PMatrix source)
( begin auto-generated from applyMatrix.xml ) Multiplies the current matrix by the one specified through the parameters.
void
applyMatrix(PMatrix2D source)
void
applyMatrix(PMatrix3D source)
void
arc(float a,
float b,
float c,
float d,
float start,
float stop)
( begin auto-generated from arc.xml ) Draws an arc in the display window.
void
arc(float a,
float b,
float c,
float d,
float start,
float stop,
int mode)
static void
arraycopy(java.lang.Object src,
int srcPosition,
java.lang.Object dst,
int dstPosition,
int length)
Deprecated.
static void
arrayCopy(java.lang.Object src,
int srcPosition,
java.lang.Object dst,
int dstPosition,
int length)
( begin auto-generated from arrayCopy.xml ) Copies an array (or part of an array) to another array.
static void
arraycopy(java.lang.Object src,
java.lang.Object dst)
Deprecated.
static void
arrayCopy(java.lang.Object src,
java.lang.Object dst)
Shortcut to copy the entire contents of the source into the destination array.
static void
arraycopy(java.lang.Object src,
java.lang.Object dst,
int length)
Deprecated.
static void
arrayCopy(java.lang.Object src,
java.lang.Object dst,
int length)
Convenience method for arraycopy().
static float
asin(float value)
( begin auto-generated from asin.xml ) The inverse of sin(), returns the arc sine of a value.
static float
atan(float value)
( begin auto-generated from atan.xml ) The inverse of tan(), returns the arc tangent of a value.
static float
atan2(float y,
float x)
( begin auto-generated from atan2.xml ) Calculates the angle (in radians) from a specified point to the coordinate origin as measured from the positive x-axis.
void
attrib(java.lang.String name,
boolean... values)
void
attrib(java.lang.String name,
float... values)
void
attrib(java.lang.String name,
int... values)
void
attribColor(java.lang.String name,
int color)
void
attribNormal(java.lang.String name,
float nx,
float ny,
float nz)
void
attribPosition(java.lang.String name,
float x,
float y,
float z)
void
background(float gray)
void
background(float gray,
float alpha)
void
background(float v1,
float v2,
float v3)
void
background(float v1,
float v2,
float v3,
float alpha)
void
background(int rgb)
( begin auto-generated from background.xml ) The background() function sets the color used for the background of the Processing window.
void
background(int rgb,
float alpha)
void
background(PImage image)
Takes an RGB or ARGB image and sets it as the background.
void
beginCamera()
( begin auto-generated from beginCamera.xml ) The beginCamera() and endCamera() functions enable advanced customization of the camera space.
void
beginContour()
PGL
beginPGL()
void
beginRaw(PGraphics rawGraphics)
PGraphics
beginRaw(java.lang.String renderer,
java.lang.String filename)
( begin auto-generated from beginRaw.xml ) To create vectors from 3D data, use the beginRaw() and endRaw() commands.
void
beginRecord(PGraphics recorder)
PGraphics
beginRecord(java.lang.String renderer,
java.lang.String filename)
( begin auto-generated from beginRecord.xml ) Opens a new file and all subsequent drawing functions are echoed to this file as well as the display window.
void
beginShape()
Start a new shape of type POLYGON
void
beginShape(int kind)
( begin auto-generated from beginShape.xml ) Using the beginShape() and endShape() functions allow creating more complex forms.
void
bezier(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
void
bezier(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
( begin auto-generated from bezier.xml ) Draws a Bezier curve on the screen.
void
bezierDetail(int detail)
( begin auto-generated from bezierDetail.xml ) Sets the resolution at which Beziers display.
float
bezierPoint(float a,
float b,
float c,
float d,
float t)
( begin auto-generated from bezierPoint.xml ) Evaluates the Bezier at point t for points a, b, c, d.
float
bezierTangent(float a,
float b,
float c,
float d,
float t)
( begin auto-generated from bezierTangent.xml ) Calculates the tangent of a point on a Bezier curve.
void
bezierVertex(float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
void
bezierVertex(float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
( begin auto-generated from bezierVertex.xml ) Specifies vertex coordinates for Bezier curves.
static java.lang.String
binary(byte value)
Returns a String that contains the binary value of a byte.
static java.lang.String
binary(char value)
Returns a String that contains the binary value of a char.
static java.lang.String
binary(int value)
Returns a String that contains the binary value of an int.
static java.lang.String
binary(int value,
int digits)
( begin auto-generated from binary.xml ) Converts a byte, char, int, or color to a String containing the equivalent binary notation.
void
blend(int sx,
int sy,
int sw,
int sh,
int dx,
int dy,
int dw,
int dh,
int mode)
void
blend(PImage src,
int sx,
int sy,
int sw,
int sh,
int dx,
int dy,
int dw,
int dh,
int mode)
( begin auto-generated from PImage_blend.xml ) Blends a region of pixels into the image specified by the img parameter.
static int
blendColor(int c1,
int c2,
int mode)
void
blendMode(int mode)
( begin auto-generated from blendMode.xml ) This is a new reference entry for Processing 2.0.
float
blue(int rgb)
( begin auto-generated from blue.xml ) Extracts the blue value from a color, scaled to match current colorMode().
void
box(float size)
( begin auto-generated from box.xml ) A box is an extruded rectangle.
void
box(float w,
float h,
float d)
float
brightness(int rgb)
( begin auto-generated from brightness.xml ) Extracts the brightness value from a color.
void
camera()
( begin auto-generated from camera.xml ) Sets the position of the camera through setting the eye position, the center of the scene, and which axis is facing upward.
void
camera(float eyeX,
float eyeY,
float eyeZ,
float centerX,
float centerY,
float centerZ,
float upX,
float upY,
float upZ)
static int
ceil(float n)
( begin auto-generated from ceil.xml ) Calculates the closest int value that is greater than or equal to the value of the parameter.
static java.lang.String
checkExtension(java.lang.String filename)
Get the compression-free extension for this filename.
void
circle(float x,
float y,
float extent)
( begin auto-generated from circle.xml ) Draws a circle to the screen.
void
clear()
void
clip(float a,
float b,
float c,
float d)
( begin auto-generated from clip.xml ) Limits the rendering to the boundaries of a rectangle defined by the parameters.
int
color(float fgray)
int
color(float fgray,
float falpha)
int
color(float v1,
float v2,
float v3)
int
color(float v1,
float v2,
float v3,
float alpha)
int
color(int gray)
( begin auto-generated from color.xml ) Creates colors for storing in variables of the color datatype.
int
color(int gray,
int alpha)
As of 0116 this also takes color(#FF8800, alpha)
int
color(int v1,
int v2,
int v3)
int
color(int v1,
int v2,
int v3,
int alpha)
void
colorMode(int mode)
( begin auto-generated from colorMode.xml ) Changes the way Processing interprets color data.
void
colorMode(int mode,
float max)
void
colorMode(int mode,
float max1,
float max2,
float max3)
void
colorMode(int mode,
float max1,
float max2,
float max3,
float maxA)
static boolean[]
concat(boolean[] a,
boolean[] b)
( begin auto-generated from concat.xml ) Concatenates two arrays.
static byte[]
concat(byte[] a,
byte[] b)
static char[]
concat(char[] a,
char[] b)
static float[]
concat(float[] a,
float[] b)
static int[]
concat(int[] a,
int[] b)
static java.lang.Object
concat(java.lang.Object a,
java.lang.Object b)
static java.lang.String[]
concat(java.lang.String[] a,
java.lang.String[] b)
static float
constrain(float amt,
float low,
float high)
( begin auto-generated from constrain.xml ) Constrains a value to not exceed a maximum and minimum value.
static int
constrain(int amt,
int low,
int high)
PImage
copy()
void
copy(int sx,
int sy,
int sw,
int sh,
int dx,
int dy,
int dw,
int dh)
( begin auto-generated from PImage_copy.xml ) Copies a region of pixels from one image into another.
void
copy(PImage src,
int sx,
int sy,
int sw,
int sh,
int dx,
int dy,
int dw,
int dh)
static float
cos(float angle)
( begin auto-generated from cos.xml ) Calculates the cosine of an angle.
PFont
createFont(java.lang.String name,
float size)
PFont
createFont(java.lang.String name,
float size,
boolean smooth)
PFont
createFont(java.lang.String name,
float size,
boolean smooth,
char[] charset)
( begin auto-generated from createFont.xml ) Dynamically converts a font to the format used by Processing from either a font name that's installed on the computer, or from a .ttf or .otf file inside the sketches "data" folder.
PGraphics
createGraphics(int w,
int h)
PGraphics
createGraphics(int w,
int h,
java.lang.String renderer)
( begin auto-generated from createGraphics.xml ) Creates and returns a new PGraphics object of the types P2D or P3D.
PGraphics
createGraphics(int w,
int h,
java.lang.String renderer,
java.lang.String path)
Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file (such as PDF or DXF).
PImage
createImage(int w,
int h,
int format)
( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images).
static java.io.InputStream
createInput(java.io.File file)
java.io.InputStream
createInput(java.lang.String filename)
( begin auto-generated from createInput.xml ) This is a function for advanced programmers to open a Java InputStream.
java.io.InputStream
createInputRaw(java.lang.String filename)
Call openStream() without automatic gzip decompression.
static java.io.OutputStream
createOutput(java.io.File file)
java.io.OutputStream
createOutput(java.lang.String filename)
( begin auto-generated from createOutput.xml ) Similar to createInput(), this creates a Java OutputStream for a given filename or path.
static void
createPath(java.io.File file)
static void
createPath(java.lang.String path)
Takes a path and creates any in-between folders if they don't already exist.
static java.io.BufferedReader
createReader(java.io.File file)
static java.io.BufferedReader
createReader(java.io.InputStream input)
java.io.BufferedReader
createReader(java.lang.String filename)
( begin auto-generated from createReader.xml ) Creates a BufferedReader object that can be used to read files line-by-line as individual String objects.
PShape
createShape()
PShape
createShape(int type)
PShape
createShape(int kind,
float... p)
static java.io.PrintWriter
createWriter(java.io.File file)
static java.io.PrintWriter
createWriter(java.io.OutputStream output)
java.io.PrintWriter
createWriter(java.lang.String filename)
( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintWriter object to write to it.
void
cursor()
Show the cursor after noCursor() was called.
void
cursor(int kind)
Set the cursor type
void
cursor(PImage img)
Replace the cursor with the specified PImage.
void
cursor(PImage img,
int x,
int y)
( begin auto-generated from cursor.xml ) Sets the cursor to a predefined symbol, an image, or makes it visible if already hidden.
void
curve(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
( begin auto-generated from curve.xml ) Draws a curved line on the screen.
void
curve(float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
void
curveDetail(int detail)
( begin auto-generated from curveDetail.xml ) Sets the resolution at which curves display.
float
curvePoint(float a,
float b,
float c,
float d,
float t)
( begin auto-generated from curvePoint.xml ) Evalutes the curve at point t for points a, b, c, d.
float
curveTangent(float a,
float b,
float c,
float d,
float t)
( begin auto-generated from curveTangent.xml ) Calculates the tangent of a point on a curve.
void
curveTightness(float tightness)
( begin auto-generated from curveTightness.xml ) Modifies the quality of forms created with curve() and curveVertex().
void
curveVertex(float x,
float y)
( begin auto-generated from curveVertex.xml ) Specifies vertex coordinates for curves.
void
curveVertex(float x,
float y,
float z)
java.io.File
dataFile(java.lang.String where)
Return a full path to an item in the data folder as a File object.
java.lang.String
dataPath(java.lang.String where)
This function almost certainly does not do the thing you want it to. The data path is handled differently on each platform, and should not be considered a location to write files.
static int
day()
( begin auto-generated from day.xml ) Processing communicates with the clock on your computer.
static void
debug(java.lang.String msg)
static float
degrees(float radians)
( begin auto-generated from degrees.xml ) Converts a radian measurement to its corresponding value in degrees.
void
delay(int napTime)
( begin auto-generated from delay.xml ) The delay() function causes the program to halt for a specified time.
static java.io.File
desktopFile(java.lang.String what)
Not a supported function.
static java.lang.String
desktopPath(java.lang.String what)
Not a supported function.
void
die(java.lang.String what)
Function for an applet/application to kill itself and display an error.
void
die(java.lang.String what,
java.lang.Exception e)
Same as above but with an exception.
void
directionalLight(float v1,
float v2,
float v3,
float nx,
float ny,
float nz)
( begin auto-generated from directionalLight.xml ) Adds a directional light.
int
displayDensity()
( begin auto-generated from displayDensity.xml ) This function returns the number "2" if the screen is a high-density screen (called a Retina display on OS X or high-dpi on Windows and Linux) and a "1" if not.
int
displayDensity(int display)
void
dispose()
Called to dispose of resources and shut down the sketch.
static float
dist(float x1,
float y1,
float x2,
float y2)
static float
dist(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
( begin auto-generated from dist.xml ) Calculates the distance between two points.
void
draw()
( begin auto-generated from draw.xml ) Called directly after setup() and continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called.
void
edge(boolean edge)
Sets whether the upcoming vertex is part of an edge.
void
ellipse(float a,
float b,
float c,
float d)
( begin auto-generated from ellipse.xml ) Draws an ellipse (oval) in the display window.
void
ellipseMode(int mode)
( begin auto-generated from ellipseMode.xml ) The origin of the ellipse is modified by the ellipseMode() function.
void
emissive(float gray)
gray number specifying value between white and black
void
emissive(float v1,
float v2,
float v3)
void
emissive(int rgb)
( begin auto-generated from emissive.xml ) Sets the emissive color of the material used for drawing shapes drawn to the screen.
void
endCamera()
( begin auto-generated from endCamera.xml ) The beginCamera() and endCamera() functions enable advanced customization of the camera space.
void
endContour()
void
endPGL()
void
endRaw()
( begin auto-generated from endRaw.xml ) Complement to beginRaw(); they must always be used together.
void
endRecord()
( begin auto-generated from endRecord.xml ) Stops the recording process started by beginRecord() and closes the file.
void
endShape()
void
endShape(int mode)
( begin auto-generated from endShape.xml ) The endShape() function is the companion to beginShape() and may only be called after beginShape().
static java.lang.Process
exec(java.lang.String... args)
Pass a set of arguments directly to the command line.
static int
exec(StringList stdout,
StringList stderr,
java.lang.String... args)
Alternative version of exec() that retrieves stdout and stderr into the StringList objects provided.
void
exit()
( begin auto-generated from exit.xml ) Quits/stops/exits the program.
void
exitActual()
Some subclasses (I'm looking at you, processing.py) might wish to do something other than actually terminate the JVM.
boolean
exitCalled()
static float
exp(float n)
( begin auto-generated from exp.xml ) Returns Euler's number e (2.71828...) raised to the power of the value parameter.
static boolean[]
expand(boolean[] list)
( begin auto-generated from expand.xml ) Increases the size of an array.
static boolean[]
expand(boolean[] list,
int newSize)
static byte[]
expand(byte[] list)
static byte[]
expand(byte[] list,
int newSize)
static char[]
expand(char[] list)
static char[]
expand(char[] list,
int newSize)
static double[]
expand(double[] list)
static double[]
expand(double[] list,
int newSize)
static float[]
expand(float[] list)
static float[]
expand(float[] list,
int newSize)
static int[]
expand(int[] list)
static int[]
expand(int[] list,
int newSize)
static long[]
expand(long[] list)
static long[]
expand(long[] list,
int newSize)
static java.lang.Object
expand(java.lang.Object array)
static java.lang.Object
expand(java.lang.Object list,
int newSize)
static java.lang.String[]
expand(java.lang.String[] list)
static java.lang.String[]
expand(java.lang.String[] list,
int newSize)
void
fill(float gray)
void
fill(float gray,
float alpha)
void
fill(float v1,
float v2,
float v3)
void
fill(float v1,
float v2,
float v3,
float alpha)
void
fill(int rgb)
( begin auto-generated from fill.xml ) Sets the color used to fill shapes.
void
fill(int rgb,
float alpha)
void
filter(int kind)
void
filter(int kind,
float param)
( begin auto-generated from PImage_filter.xml ) Filters an image as defined by one of the following modes:
THRESHOLD - converts the image to black and white pixels depending if they are above or below the threshold defined by the level parameter.
void
filter(PShader shader)
static int
floor(float n)
( begin auto-generated from floor.xml ) Calculates the closest int value that is less than or equal to the value of the parameter.
void
flush()
void
focusGained()
void
focusLost()
void
frameMoved(int x,
int y)
void
frameRate(float fps)
( begin auto-generated from frameRate.xml ) Specifies the number of frames to be displayed every second.
void
frameResized(int w,
int h)
void
frustum(float left,
float right,
float bottom,
float top,
float near,
float far)
( begin auto-generated from frustum.xml ) Sets a perspective matrix defined through the parameters.
void
fullScreen()
Create a full-screen sketch using the default renderer.
void
fullScreen(int display)
void
fullScreen(java.lang.String renderer)
( begin auto-generated from fullScreen.xml ) Description to come...
void
fullScreen(java.lang.String renderer,
int display)
PImage
get()
Returns a copy of this PImage.
int
get(int x,
int y)
( begin auto-generated from PImage_get.xml ) Reads the color of any pixel or grabs a section of an image.
PImage
get(int x,
int y,
int w,
int h)
static java.lang.String
getExtension(java.lang.String filename)
PGraphics
getGraphics()
PMatrix
getMatrix()
PMatrix2D
getMatrix(PMatrix2D target)
Copy the current transformation matrix into the specified target.
PMatrix3D
getMatrix(PMatrix3D target)
Copy the current transformation matrix into the specified target.
PSurface
getSurface()
float
green(int rgb)
( begin auto-generated from green.xml ) Extracts the green value from a color, scaled to match current colorMode().
void
handleDraw()
static java.lang.String
hex(byte value)
( begin auto-generated from hex.xml ) Converts a byte, char, int, or color to a String containing the equivalent hexadecimal notation.
static java.lang.String
hex(char value)
static java.lang.String
hex(int value)
static java.lang.String
hex(int value,
int digits)
static void
hideMenuBar()
Convenience method, should only be called by PSurface subclasses.
void
hint(int which)
static int
hour()
( begin auto-generated from hour.xml ) Processing communicates with the clock on your computer.
float
hue(int rgb)
( begin auto-generated from hue.xml ) Extracts the hue value from a color.
void
image(PImage img,
float a,
float b)
( begin auto-generated from image.xml ) Displays images to the screen.
void
image(PImage img,
float a,
float b,
float c,
float d)
void
image(PImage img,
float a,
float b,
float c,
float d,
int u1,
int v1,
int u2,
int v2)
Draw an image(), also specifying u/v coordinates.
void
imageMode(int mode)
( begin auto-generated from imageMode.xml ) Modifies the location from which images draw.
java.lang.String
insertFrame(java.lang.String what)
Check a string for #### signs to see if the frame number should be inserted.
boolean
isLooping()
static java.lang.String
join(java.lang.String[] list,
char separator)
( begin auto-generated from join.xml ) Combines an array of Strings into one String, each separated by the character(s) used for the separator parameter.
static java.lang.String
join(java.lang.String[] list,
java.lang.String separator)
void
keyPressed()
( begin auto-generated from keyPressed.xml ) The keyPressed() function is called once every time a key is pressed.
void
keyPressed(KeyEvent event)
void
keyReleased()
( begin auto-generated from keyReleased.xml ) The keyReleased() function is called once every time a key is released.
void
keyReleased(KeyEvent event)
void
keyTyped()
( begin auto-generated from keyTyped.xml ) The keyTyped() function is called once every time a key is pressed, but action keys such as Ctrl, Shift, and Alt are ignored.
void
keyTyped(KeyEvent event)
static java.lang.Process
launch(java.lang.String... args)
( begin auto-generated from launch.xml ) Attempts to open an application or file using your platform's launcher.
static float
lerp(float start,
float stop,
float amt)
( begin auto-generated from lerp.xml ) Calculates a number between two numbers at a specific increment.
int
lerpColor(int c1,
int c2,
float amt)
( begin auto-generated from lerpColor.xml ) Calculates a color or colors between two color at a specific increment.
static int
lerpColor(int c1,
int c2,
float amt,
int mode)
void
lightFalloff(float constant,
float linear,
float quadratic)
( begin auto-generated from lightFalloff.xml ) Sets the falloff rates for point lights, spot lights, and ambient lights.
void
lights()
( begin auto-generated from lights.xml ) Sets the default ambient light, directional light, falloff, and specular values.
void
lightSpecular(float v1,
float v2,
float v3)
( begin auto-generated from lightSpecular.xml ) Sets the specular color for lights.
void
line(float x1,
float y1,
float x2,
float y2)
( begin auto-generated from line.xml ) Draws a line (a direct path between two points) to the screen.
void
line(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
void
link(java.lang.String url)
Links to a webpage either in the same window or in a new window.
static java.io.File[]
listFiles(java.io.File base,
java.lang.String... options)
java.io.File[]
listFiles(java.lang.String path,
java.lang.String... options)
java.lang.String[]
listPaths(java.lang.String path,
java.lang.String... options)
static byte[]
loadBytes(java.io.File file)
static byte[]
loadBytes(java.io.InputStream input)
byte[]
loadBytes(java.lang.String filename)
( begin auto-generated from loadBytes.xml ) Reads the contents of a file or url and places it in a byte array.
PFont
loadFont(java.lang.String filename)
( begin auto-generated from loadFont.xml ) Loads a font into a variable of type PFont.
PImage
loadImage(java.lang.String filename)
( begin auto-generated from loadImage.xml ) Loads an image into a variable of type PImage.
PImage
loadImage(java.lang.String filename,
java.lang.String extension)
static JSONArray
loadJSONArray(java.io.File file)
JSONArray
loadJSONArray(java.lang.String filename)
static JSONObject
loadJSONObject(java.io.File file)
JSONObject
loadJSONObject(java.lang.String filename)
void
loadPixels()
( begin auto-generated from loadPixels.xml ) Loads the pixel data for the display window into the pixels[] array.
PShader
loadShader(java.lang.String fragFilename)
( begin auto-generated from loadShader.xml ) This is a new reference entry for Processing 2.0.
PShader
loadShader(java.lang.String fragFilename,
java.lang.String vertFilename)
PShape
loadShape(java.lang.String filename)
PShape
loadShape(java.lang.String filename,
java.lang.String options)
static java.lang.String[]
loadStrings(java.io.BufferedReader reader)
static java.lang.String[]
loadStrings(java.io.File file)
static java.lang.String[]
loadStrings(java.io.InputStream input)
java.lang.String[]
loadStrings(java.lang.String filename)
( begin auto-generated from loadStrings.xml ) Reads the contents of a file or url and creates a String array of its individual lines.
Table
loadTable(java.lang.String filename)
Table
loadTable(java.lang.String filename,
java.lang.String options)
Options may contain "header", "tsv", "csv", or "bin" separated by commas.
XML
loadXML(java.lang.String filename)
XML
loadXML(java.lang.String filename,
java.lang.String options)
static float
log(float n)
( begin auto-generated from log.xml ) Calculates the natural logarithm (the base-e logarithm) of a number.
void
loop()
( begin auto-generated from loop.xml ) Causes Processing to continuously execute the code within draw().
static float
mag(float a,
float b)
static float
mag(float a,
float b,
float c)
( begin auto-generated from mag.xml ) Calculates the magnitude (or length) of a vector.
static void
main(java.lang.Class<?> mainClass,
java.lang.String... args)
Convenience method so that PApplet.main(YourSketch.class) launches a sketch, rather than having to call getName() on it.
static void
main(java.lang.String mainClass)
Convenience method so that PApplet.main("YourSketch") launches a sketch, rather than having to wrap it into a single element String array.
static void
main(java.lang.String[] args)
main() method for running this class from the command line.
static void
main(java.lang.String mainClass,
java.lang.String[] sketchArgs)
Convenience method so that PApplet.main("YourSketch", args) launches a sketch, rather than having to wrap it into a String array, and appending the 'args' array when not null.
static float
map(float value,
float start1,
float stop1,
float start2,
float stop2)
( begin auto-generated from map.xml ) Re-maps a number from one range to another.
void
mask(PImage img)
( begin auto-generated from PImage_mask.xml ) Masks part of an image from displaying by loading another image and using it as an alpha channel.
static java.lang.String[]
match(java.lang.String str,
java.lang.String regexp)
( begin auto-generated from match.xml ) The match() function is used to apply a regular expression to a piece of text, and return matching groups (elements found inside parentheses) as a String array.
static java.lang.String[][]
matchAll(java.lang.String str,
java.lang.String regexp)
( begin auto-generated from matchAll.xml ) This function is used to apply a regular expression to a piece of text, and return a list of matching groups (elements found inside parentheses) as a two-dimensional String array.
static float
max(float[] list)
static float
max(float a,
float b)
static float
max(float a,
float b,
float c)
static int
max(int[] list)
static int
max(int a,
int b)
( begin auto-generated from max.xml ) Determines the largest value in a sequence of numbers.
static int
max(int a,
int b,
int c)
void
method(java.lang.String name)
Call a method in the current class based on its name.
int
millis()
( begin auto-generated from millis.xml ) Returns the number of milliseconds (thousandths of a second) since starting an applet.
static float
min(float[] list)
static float
min(float a,
float b)
static float
min(float a,
float b,
float c)
( begin auto-generated from min.xml ) Determines the smallest value in a sequence of numbers.
static int
min(int[] list)
static int
min(int a,
int b)
static int
min(int a,
int b,
int c)
static int
minute()
( begin auto-generated from minute.xml ) Processing communicates with the clock on your computer.
float
modelX(float x,
float y,
float z)
( begin auto-generated from modelX.xml ) Returns the three-dimensional X, Y, Z position in model space.
float
modelY(float x,
float y,
float z)
( begin auto-generated from modelY.xml ) Returns the three-dimensional X, Y, Z position in model space.
float
modelZ(float x,
float y,
float z)
( begin auto-generated from modelZ.xml ) Returns the three-dimensional X, Y, Z position in model space.
static int
month()
( begin auto-generated from month.xml ) Processing communicates with the clock on your computer.
void
mouseClicked()
( begin auto-generated from mouseClicked.xml ) The mouseClicked() function is called once after a mouse button has been pressed and then released.
void
mouseClicked(MouseEvent event)
void
mouseDragged()
( begin auto-generated from mouseDragged.xml ) The mouseDragged() function is called once every time the mouse moves and a mouse button is pressed.
void
mouseDragged(MouseEvent event)
void
mouseEntered()
void
mouseEntered(MouseEvent event)
void
mouseExited()
void
mouseExited(MouseEvent event)
void
mouseMoved()
( begin auto-generated from mouseMoved.xml ) The mouseMoved() function is called every time the mouse moves and a mouse button is not pressed.
void
mouseMoved(MouseEvent event)
void
mousePressed()
( begin auto-generated from mousePressed.xml ) The mousePressed() function is called once after every time a mouse button is pressed.
void
mousePressed(MouseEvent event)
void
mouseReleased()
( begin auto-generated from mouseReleased.xml ) The mouseReleased() function is called every time a mouse button is released.
void
mouseReleased(MouseEvent event)
void
mouseWheel()
void
mouseWheel(MouseEvent event)
The event.getAmount() method returns negative values if the mouse wheel if rotated up or away from the user and positive in the other direction.
static java.lang.String
nf(float num)
static java.lang.String[]
nf(float[] nums)
static java.lang.String[]
nf(float[] nums,
int left,
int right)
static java.lang.String
nf(float num,
int left,
int right)
static java.lang.String[]
nf(int[] nums,
int digits)
( begin auto-generated from nf.xml ) Utility function for formatting numbers into strings.
static java.lang.String
nf(int num,
int digits)
static java.lang.String[]
nfc(float[] nums,
int right)
static java.lang.String
nfc(float num,
int right)
static java.lang.String
nfc(int num)
static java.lang.String[]
nfc(int[] nums)
( begin auto-generated from nfc.xml ) Utility function for formatting numbers into strings and placing appropriate commas to mark units of 1000.
static java.lang.String[]
nfp(float[] nums,
int left,
int right)
static java.lang.String
nfp(float num,
int left,
int right)
static java.lang.String[]
nfp(int[] nums,
int digits)
static java.lang.String
nfp(int num,
int digits)
( begin auto-generated from nfp.xml ) Utility function for formatting numbers into strings.
static java.lang.String[]
nfs(float[] nums,
int left,
int right)
static java.lang.String
nfs(float num,
int left,
int right)
static java.lang.String[]
nfs(int[] nums,
int digits)
static java.lang.String
nfs(int num,
int digits)
( begin auto-generated from nfs.xml ) Utility function for formatting numbers into strings.
void
noClip()
( begin auto-generated from noClip.xml ) Disables the clipping previously started by the clip() function.
void
noCursor()
( begin auto-generated from noCursor.xml ) Hides the cursor from view.
void
noFill()
( begin auto-generated from noFill.xml ) Disables filling geometry.
float
noise(float x)
float
noise(float x,
float y)
float
noise(float x,
float y,
float z)
( begin auto-generated from noise.xml ) Returns the Perlin noise value at specified coordinates.
void
noiseDetail(int lod)
( begin auto-generated from noiseDetail.xml ) Adjusts the character and level of detail produced by the Perlin noise function.
void
noiseDetail(int lod,
float falloff)
void
noiseSeed(long seed)
( begin auto-generated from noiseSeed.xml ) Sets the seed value for noise().
void
noLights()
( begin auto-generated from noLights.xml ) Disable all lighting.
void
noLoop()
( begin auto-generated from noLoop.xml ) Stops Processing from continuously executing the code within draw().
static float
norm(float value,
float start,
float stop)
( begin auto-generated from norm.xml ) Normalizes a number from another range into a value between 0 and 1.
void
normal(float nx,
float ny,
float nz)
( begin auto-generated from normal.xml ) Sets the current normal vector.
void
noSmooth()
void
noStroke()
( begin auto-generated from noStroke.xml ) Disables drawing the stroke (outline).
void
noTexture()
Removes texture image for current shape.
void
noTint()
( begin auto-generated from noTint.xml ) Removes the current fill value for displaying images and reverts to displaying images with their original hues.
void
orientation(int which)
void
ortho()
( begin auto-generated from ortho.xml ) Sets an orthographic projection and defines a parallel clipping volume.
void
ortho(float left,
float right,
float bottom,
float top)
void
ortho(float left,
float right,
float bottom,
float top,
float near,
float far)
static boolean
parseBoolean(int what)
Convert an integer to a boolean.
static boolean[]
parseBoolean(int[] what)
Convert an int array to a boolean array.
static boolean
parseBoolean(java.lang.String what)
Convert the string "true" or "false" to a boolean.
static boolean[]
parseBoolean(java.lang.String[] what)
static byte
parseByte(boolean what)
static byte[]
parseByte(boolean[] what)
static byte
parseByte(char what)
static byte[]
parseByte(char[] what)
static byte
parseByte(float what)
static byte[]
parseByte(float[] what)
static byte
parseByte(int what)
static byte[]
parseByte(int[] what)
static char
parseChar(byte what)
static char[]
parseChar(byte[] what)
static char
parseChar(int what)
static char[]
parseChar(int[] what)
static float[]
parseFloat(byte[] what)
static float
parseFloat(int what)
Convert an int to a float value.
static float[]
parseFloat(int[] what)
static float
parseFloat(java.lang.String what)
static float[]
parseFloat(java.lang.String[] what)
static float[]
parseFloat(java.lang.String[] what,
float missing)
static float
parseFloat(java.lang.String what,
float otherwise)
static int
parseInt(boolean what)
static int[]
parseInt(boolean[] what)
static int
parseInt(byte what)
Note that parseInt() will un-sign a signed byte value.
static int[]
parseInt(byte[] what)
static int
parseInt(char what)
Note that parseInt('5') is unlike String in the sense that it won't return 5, but the ascii value.
static int[]
parseInt(char[] what)
static int
parseInt(float what)
Same as floor(), or an (int) cast.
static int[]
parseInt(float[] what)
static int
parseInt(java.lang.String what)
Parse a String into an int value.
static int[]
parseInt(java.lang.String[] what)
Make an array of int elements from an array of String objects.
static int[]
parseInt(java.lang.String[] what,
int missing)
Make an array of int elements from an array of String objects.
static int
parseInt(java.lang.String what,
int otherwise)
Parse a String to an int, and provide an alternate value that should be used when the number is invalid.
JSONArray
parseJSONArray(java.lang.String input)
JSONObject
parseJSONObject(java.lang.String input)
XML
parseXML(java.lang.String xmlString)
XML
parseXML(java.lang.String xmlString,
java.lang.String options)
void
pause()
Sketch has been paused.
void
perspective()
( begin auto-generated from perspective.xml ) Sets a perspective projection applying foreshortening, making distant objects appear smaller than closer ones.
void
perspective(float fovy,
float aspect,
float zNear,
float zFar)
void
pixelDensity(int density)
void
point(float x,
float y)
( begin auto-generated from point.xml ) Draws a point, a coordinate in space at the dimension of one pixel.
void
point(float x,
float y,
float z)
void
pointLight(float v1,
float v2,
float v3,
float x,
float y,
float z)
( begin auto-generated from pointLight.xml ) Adds a point light.
void
pop()
( begin auto-generated from pop.xml ) The pop() function restores the previous drawing style settings and transformations after push() has changed them.
void
popMatrix()
( begin auto-generated from popMatrix.xml ) Pops the current transformation matrix off the matrix stack.
void
popStyle()
( begin auto-generated from popStyle.xml ) The pushStyle() function saves the current style settings and popStyle() restores the prior settings; these functions are always used together.
void
postEvent(Event pe)
Add an event to the internal event queue, or process it immediately if the sketch is not currently looping.
static float
pow(float n,
float e)
( begin auto-generated from pow.xml ) Facilitates exponential expressions.
static void
print(boolean what)
static void
print(byte what)
( begin auto-generated from print.xml ) Writes to the console area of the Processing environment.
static void
print(char what)
static void
print(double what)
static void
print(float what)
static void
print(int what)
static void
print(long what)
static void
print(java.lang.Object... variables)
static void
print(java.lang.String what)
static void
printArray(java.lang.Object what)
( begin auto-generated from printArray.xml ) To come...
void
printCamera()
( begin auto-generated from printCamera.xml ) Prints the current camera matrix to the Console (the text window at the bottom of Processing).
static void
println()
( begin auto-generated from println.xml ) Writes to the text area of the Processing environment's console.
static void
println(boolean what)
static void
println(byte what)
static void
println(char what)
static void
println(double what)
static void
println(float what)
static void
println(int what)
static void
println(long what)
static void
println(java.lang.Object... variables)
static void
println(java.lang.Object what)
For arrays, use printArray() instead.
static void
println(java.lang.String what)
void
printMatrix()
( begin auto-generated from printMatrix.xml ) Prints the current matrix to the Console (the text window at the bottom of Processing).
void
printProjection()
( begin auto-generated from printProjection.xml ) Prints the current projection matrix to the Console (the text window at the bottom of Processing).
void
push()
( begin auto-generated from push.xml ) The push() function saves the current drawing style settings and transformations, while pop() restores these settings.
void
pushMatrix()
( begin auto-generated from pushMatrix.xml ) Pushes the current transformation matrix onto the matrix stack.
void
pushStyle()
( begin auto-generated from pushStyle.xml ) The pushStyle() function saves the current style settings and popStyle() restores the prior settings.
void
quad(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
( begin auto-generated from quad.xml ) A quad is a quadrilateral, a four sided polygon.
void
quadraticVertex(float cx,
float cy,
float x3,
float y3)
void
quadraticVertex(float cx,
float cy,
float cz,
float x3,
float y3,
float z3)
static float
radians(float degrees)
( begin auto-generated from radians.xml ) Converts a degree measurement to its corresponding value in radians.
float
random(float high)
float
random(float low,
float high)
( begin auto-generated from random.xml ) Generates random numbers.
float
randomGaussian()
( begin auto-generated from randomGaussian.xml ) Returns a float from a random series of numbers having a mean of 0 and standard deviation of 1.
void
randomSeed(long seed)
( begin auto-generated from randomSeed.xml ) Sets the seed value for random().
void
rect(float a,
float b,
float c,
float d)
( begin auto-generated from rect.xml ) Draws a rectangle to the screen.
void
rect(float a,
float b,
float c,
float d,
float r)
void
rect(float a,
float b,
float c,
float d,
float tl,
float tr,
float br,
float bl)
void
rectMode(int mode)
( begin auto-generated from rectMode.xml ) Modifies the location from which rectangles draw.
float
red(int rgb)
( begin auto-generated from red.xml ) Extracts the red value from a color, scaled to match current colorMode().
void
redraw()
( begin auto-generated from redraw.xml ) Executes the code within draw() one time.
void
registerMethod(java.lang.String methodName,
java.lang.Object target)
Register a built-in event so that it can be fired for libraries, etc.
PImage
requestImage(java.lang.String filename)
PImage
requestImage(java.lang.String filename,
java.lang.String extension)
( begin auto-generated from requestImage.xml ) This function load images on a separate thread so that your sketch does not freeze while images load during setup().
void
resetMatrix()
( begin auto-generated from resetMatrix.xml ) Replaces the current matrix with the identity matrix.
void
resetShader()
( begin auto-generated from resetShader.xml ) This is a new reference entry for Processing 2.0.
void
resetShader(int kind)
void
resume()
Sketch has resumed.
static boolean[]
reverse(boolean[] list)
( begin auto-generated from reverse.xml ) Reverses the order of an array.
static byte[]
reverse(byte[] list)
static char[]
reverse(char[] list)
static float[]
reverse(float[] list)
static int[]
reverse(int[] list)
static java.lang.Object
reverse(java.lang.Object list)
static java.lang.String[]
reverse(java.lang.String[] list)
void
rotate(float angle)
( begin auto-generated from rotate.xml ) Rotates a shape the amount specified by the angle parameter.
void
rotate(float angle,
float x,
float y,
float z)
Advanced
void
rotateX(float angle)
( begin auto-generated from rotateX.xml ) Rotates a shape around the x-axis the amount specified by the angle parameter.
void
rotateY(float angle)
( begin auto-generated from rotateY.xml ) Rotates a shape around the y-axis the amount specified by the angle parameter.
void
rotateZ(float angle)
( begin auto-generated from rotateZ.xml ) Rotates a shape around the z-axis the amount specified by the angle parameter.
static int
round(float n)
( begin auto-generated from round.xml ) Calculates the integer closest to the value parameter.
static void
runSketch(java.lang.String[] args,
PApplet constructedSketch)
float
saturation(int rgb)
( begin auto-generated from saturation.xml ) Extracts the saturation value from a color.
void
save(java.lang.String filename)
( begin auto-generated from save.xml ) Saves an image from the display window.
static void
saveBytes(java.io.File file,
byte[] data)
static void
saveBytes(java.io.OutputStream output,
byte[] data)
void
saveBytes(java.lang.String filename,
byte[] data)
( begin auto-generated from saveBytes.xml ) Opposite of loadBytes(), will write an entire array of bytes to a file.
java.io.File
saveFile(java.lang.String where)
Identical to savePath(), but returns a File object.
void
saveFrame()
void
saveFrame(java.lang.String filename)
( begin auto-generated from saveFrame.xml ) Saves a numbered sequence of images, one image each time the function is run.
boolean
saveJSONArray(JSONArray json,
java.lang.String filename)
boolean
saveJSONArray(JSONArray json,
java.lang.String filename,
java.lang.String options)
boolean
saveJSONObject(JSONObject json,
java.lang.String filename)
boolean
saveJSONObject(JSONObject json,
java.lang.String filename,
java.lang.String options)
java.lang.String
savePath(java.lang.String where)
Returns a path inside the applet folder to save to.
static boolean
saveStream(java.io.File target,
java.io.InputStream source)
boolean
saveStream(java.io.File target,
java.lang.String source)
Identical to the other saveStream(), but writes to a File object, for greater control over the file location.
static void
saveStream(java.io.OutputStream target,
java.io.InputStream source)
boolean
saveStream(java.lang.String target,
java.io.InputStream source)
boolean
saveStream(java.lang.String target,
java.lang.String source)
( begin auto-generated from saveStream.xml ) Save the contents of a stream to a file in the sketch folder.
static void
saveStrings(java.io.File file,
java.lang.String[] data)
static void
saveStrings(java.io.OutputStream output,
java.lang.String[] data)
void
saveStrings(java.lang.String filename,
java.lang.String[] data)
( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per string.
boolean
saveTable(Table table,
java.lang.String filename)
boolean
saveTable(Table table,
java.lang.String filename,
java.lang.String options)
boolean
saveXML(XML xml,
java.lang.String filename)
boolean
saveXML(XML xml,
java.lang.String filename,
java.lang.String options)
void
scale(float s)
( begin auto-generated from scale.xml ) Increases or decreases the size of a shape by expanding and contracting vertices.
void
scale(float x,
float y)
Advanced
void
scale(float x,
float y,
float z)
float
screenX(float x,
float y)
( begin auto-generated from screenX.xml ) Takes a three-dimensional X, Y, Z position and returns the X value for where it will appear on a (two-dimensional) screen.
float
screenX(float x,
float y,
float z)
float
screenY(float x,
float y)
( begin auto-generated from screenY.xml ) Takes a three-dimensional X, Y, Z position and returns the Y value for where it will appear on a (two-dimensional) screen.
float
screenY(float x,
float y,
float z)
float
screenZ(float x,
float y,
float z)
( begin auto-generated from screenZ.xml ) Takes a three-dimensional X, Y, Z position and returns the Z value for where it will appear on a (two-dimensional) screen.
static int
second()
( begin auto-generated from second.xml ) Processing communicates with the clock on your computer.
void
selectFolder(java.lang.String prompt,
java.lang.String callback)
See selectInput() for details.
void
selectFolder(java.lang.String prompt,
java.lang.String callback,
java.io.File file)
void
selectFolder(java.lang.String prompt,
java.lang.String callback,
java.io.File file,
java.lang.Object callbackObject)
static void
selectFolder(java.lang.String prompt,
java.lang.String callbackMethod,
java.io.File defaultSelection,
java.lang.Object callbackObject,
java.awt.Frame parentFrame)
static void
selectFolder(java.lang.String prompt,
java.lang.String callbackMethod,
java.io.File defaultSelection,
java.lang.Object callbackObject,
java.awt.Frame parentFrame,
PApplet sketch)
void
selectInput(java.lang.String prompt,
java.lang.String callback)
Open a platform-specific file chooser dialog to select a file for input.
void
selectInput(java.lang.String prompt,
java.lang.String callback,
java.io.File file)
void
selectInput(java.lang.String prompt,
java.lang.String callback,
java.io.File file,
java.lang.Object callbackObject)
static void
selectInput(java.lang.String prompt,
java.lang.String callbackMethod,
java.io.File file,
java.lang.Object callbackObject,
java.awt.Frame parent)
static void
selectInput(java.lang.String prompt,
java.lang.String callbackMethod,
java.io.File file,
java.lang.Object callbackObject,
java.awt.Frame parent,
PApplet sketch)
void
selectOutput(java.lang.String prompt,
java.lang.String callback)
See selectInput() for details.
void
selectOutput(java.lang.String prompt,
java.lang.String callback,
java.io.File file)
void
selectOutput(java.lang.String prompt,
java.lang.String callback,
java.io.File file,
java.lang.Object callbackObject)
static void
selectOutput(java.lang.String prompt,
java.lang.String callbackMethod,
java.io.File file,
java.lang.Object callbackObject,
java.awt.Frame parent)
static void
selectOutput(java.lang.String prompt,
java.lang.String callbackMethod,
java.io.File file,
java.lang.Object callbackObject,
java.awt.Frame parent,
PApplet sketch)
void
set(int x,
int y,
int c)
( begin auto-generated from PImage_set.xml ) Changes the color of any pixel or writes an image directly into the display window.
The x and y parameters specify the pixel to change and the color parameter specifies the color value.
void
set(int x,
int y,
PImage img)
Advanced
void
setMatrix(PMatrix source)
Set the current transformation matrix to the contents of another.
void
setMatrix(PMatrix2D source)
Set the current transformation to the contents of the specified source.
void
setMatrix(PMatrix3D source)
Set the current transformation to the contents of the specified source.
void
setSize(int width,
int height)
Called by PSurface objects to set the width and height variables, and update the pixelWidth and pixelHeight variables.
void
settings()
( begin auto-generated from settings.xml ) Description to come...
void
setup()
( begin auto-generated from setup.xml ) The setup() function is called once when the program starts.
void
shader(PShader shader)
( begin auto-generated from shader.xml ) This is a new reference entry for Processing 2.0.
void
shader(PShader shader,
int kind)
void
shape(PShape shape)
void
shape(PShape shape,
float x,
float y)
( begin auto-generated from shape.xml ) Displays shapes to the screen.
void
shape(PShape shape,
float a,
float b,
float c,
float d)
void
shapeMode(int mode)
( begin auto-generated from shapeMode.xml ) Modifies the location from which shapes draw.
void
shearX(float angle)
( begin auto-generated from shearX.xml ) Shears a shape around the x-axis the amount specified by the angle parameter.
void
shearY(float angle)
( begin auto-generated from shearY.xml ) Shears a shape around the y-axis the amount specified by the angle parameter.
static int
shell(StringList stdout,
StringList stderr,
java.lang.String... args)
Same as exec() above, but prefixes the call with a shell.
void
shininess(float shine)
( begin auto-generated from shininess.xml ) Sets the amount of gloss in the surface of shapes.
static boolean[]
shorten(boolean[] list)
( begin auto-generated from shorten.xml ) Decreases an array by one element and returns the shortened array.
static byte[]
shorten(byte[] list)
static char[]
shorten(char[] list)
static float[]
shorten(float[] list)
static int[]
shorten(int[] list)
static java.lang.Object
shorten(java.lang.Object list)
static java.lang.String[]
shorten(java.lang.String[] list)
static void
showDepthWarning(java.lang.String method)
Display a warning that the specified method is only available with 3D.
static void
showDepthWarningXYZ(java.lang.String method)
Display a warning that the specified method that takes x, y, z parameters can only be used with x and y parameters in this renderer.
static void
showMethodWarning(java.lang.String method)
Display a warning that the specified method is simply unavailable.
static void
showMissingWarning(java.lang.String method)
Display a warning that the specified method is not implemented, meaning that it could be either a completely missing function, although other variations of it may still work properly.
static void
showVariationWarning(java.lang.String str)
Error that a particular variation of a method is unavailable (even though other variations are).
static float
sin(float angle)
( begin auto-generated from sin.xml ) Calculates the sine of an angle.
void
size(int width,
int height)
( begin auto-generated from size.xml ) Defines the dimension of the display window in units of pixels.
void
size(int width,
int height,
java.lang.String renderer)
void
size(int width,
int height,
java.lang.String renderer,
java.lang.String path)
int
sketchDisplay()
java.io.File
sketchFile(java.lang.String where)
boolean
sketchFullScreen()
int
sketchHeight()
java.lang.String
sketchOutputPath()
java.io.OutputStream
sketchOutputStream()
java.lang.String
sketchPath()
java.lang.String
sketchPath(java.lang.String where)
Prepend the sketch folder path to the filename (or path) that is passed in.
int
sketchPixelDensity()
java.lang.String
sketchRenderer()
int
sketchSmooth()
int
sketchWidth()
int
sketchWindowColor()
void
smooth()
void
smooth(int level)
static byte[]
sort(byte[] list)
( begin auto-generated from sort.xml ) Sorts an array of numbers from smallest to largest and puts an array of words in alphabetical order.
static byte[]
sort(byte[] list,
int count)
static char[]
sort(char[] list)
static char[]
sort(char[] list,
int count)
static float[]
sort(float[] list)
static float[]
sort(float[] list,
int count)
static int[]
sort(int[] list)
static int[]
sort(int[] list,
int count)
static java.lang.String[]
sort(java.lang.String[] list)
static java.lang.String[]
sort(java.lang.String[] list,
int count)
void
specular(float gray)
gray number specifying value between white and black
void
specular(float v1,
float v2,
float v3)
void
specular(int rgb)
( begin auto-generated from specular.xml ) Sets the specular color of the materials used for shapes drawn to the screen, which sets the color of hightlights.
void
sphere(float r)
( begin auto-generated from sphere.xml ) A sphere is a hollow ball made from tessellated triangles.
void
sphereDetail(int res)
( begin auto-generated from sphereDetail.xml ) Controls the detail used to render a sphere by adjusting the number of vertices of the sphere mesh.
void
sphereDetail(int ures,
int vres)
static boolean[]
splice(boolean[] list,
boolean[] value,
int index)
static boolean[]
splice(boolean[] list,
boolean value,
int index)
( begin auto-generated from splice.xml ) Inserts a value or array of values into an existing array.
static byte[]
splice(byte[] list,
byte[] value,
int index)
static byte[]
splice(byte[] list,
byte value,
int index)
static char[]
splice(char[] list,
char[] value,
int index)
static char[]
splice(char[] list,
char value,
int index)
static float[]
splice(float[] list,
float[] value,
int index)
static float[]
splice(float[] list,
float value,
int index)
static int[]
splice(int[] list,
int[] value,
int index)
static int[]
splice(int[] list,
int value,
int index)
static java.lang.Object
splice(java.lang.Object list,
java.lang.Object value,
int index)
static java.lang.String[]
splice(java.lang.String[] list,
java.lang.String[] value,
int index)
static java.lang.String[]
splice(java.lang.String[] list,
java.lang.String value,
int index)
static java.lang.String[]
split(java.lang.String value,
char delim)
( begin auto-generated from split.xml ) The split() function breaks a string into pieces using a character or string as the divider.
static java.lang.String[]
split(java.lang.String value,
java.lang.String delim)
static java.lang.String[]
splitTokens(java.lang.String value)
static java.lang.String[]
splitTokens(java.lang.String value,
java.lang.String delim)
( begin auto-generated from splitTokens.xml ) The splitTokens() function splits a String at one or many character "tokens." The tokens parameter specifies the character or characters to be used as a boundary.
void
spotLight(float v1,
float v2,
float v3,
float x,
float y,
float z,
float nx,
float ny,
float nz,
float angle,
float concentration)
( begin auto-generated from spotLight.xml ) Adds a spot light.
static float
sq(float n)
( begin auto-generated from sq.xml ) Squares a number (multiplies a number by itself).
static float
sqrt(float n)
( begin auto-generated from sqrt.xml ) Calculates the square root of a number.
void
square(float x,
float y,
float extent)
( begin auto-generated from square.xml ) Draws a square to the screen.
void
start()
Called by the browser or applet viewer to inform this applet that it should start its execution.
void
stop()
Called by the browser or applet viewer to inform this applet that it should stop its execution.
static java.lang.String
str(boolean x)
static java.lang.String[]
str(boolean[] x)
static java.lang.String
str(byte x)
static java.lang.String[]
str(byte[] x)
static java.lang.String
str(char x)
static java.lang.String[]
str(char[] x)
static java.lang.String
str(float x)
static java.lang.String[]
str(float[] x)
static java.lang.String
str(int x)
static java.lang.String[]
str(int[] x)
void
stroke(float gray)
void
stroke(float gray,
float alpha)
void
stroke(float v1,
float v2,
float v3)
void
stroke(float v1,
float v2,
float v3,
float alpha)
void
stroke(int rgb)
( begin auto-generated from stroke.xml ) Sets the color used to draw lines and borders around shapes.
void
stroke(int rgb,
float alpha)
void
strokeCap(int cap)
( begin auto-generated from strokeCap.xml ) Sets the style for rendering line endings.
void
strokeJoin(int join)
( begin auto-generated from strokeJoin.xml ) Sets the style of the joints which connect line segments.
void
strokeWeight(float weight)
( begin auto-generated from strokeWeight.xml ) Sets the width of the stroke used for lines, points, and the border around shapes.
void
style(PStyle s)
static boolean[]
subset(boolean[] list,
int start)
static boolean[]
subset(boolean[] list,
int start,
int count)
( begin auto-generated from subset.xml ) Extracts an array of elements from an existing array.
static byte[]
subset(byte[] list,
int start)
static byte[]
subset(byte[] list,
int start,
int count)
static char[]
subset(char[] list,
int start)
static char[]
subset(char[] list,
int start,
int count)
static double[]
subset(double[] list,
int start)
static double[]
subset(double[] list,
int start,
int count)
static float[]
subset(float[] list,
int start)
static float[]
subset(float[] list,
int start,
int count)
static int[]
subset(int[] list,
int start)
static int[]
subset(int[] list,
int start,
int count)
static long[]
subset(long[] list,
int start)
static long[]
subset(long[] list,
int start,
int count)
static java.lang.Object
subset(java.lang.Object list,
int start)
static java.lang.Object
subset(java.lang.Object list,
int start,
int count)
static java.lang.String[]
subset(java.lang.String[] list,
int start)
static java.lang.String[]
subset(java.lang.String[] list,
int start,
int count)
static float
tan(float angle)
( begin auto-generated from tan.xml ) Calculates the ratio of the sine and cosine of an angle.
void
text(char[] chars,
int start,
int stop,
float x,
float y)
Advanced
void
text(char[] chars,
int start,
int stop,
float x,
float y,
float z)
void
text(char c,
float x,
float y)
( begin auto-generated from text.xml ) Draws text to the screen.
void
text(char c,
float x,
float y,
float z)
void
text(float num,
float x,
float y)
This does a basic number formatting, to avoid the generally ugly appearance of printing floats.
void
text(float num,
float x,
float y,
float z)
void
text(int num,
float x,
float y)
void
text(int num,
float x,
float y,
float z)
void
text(java.lang.String str,
float x,
float y)
Advanced
void
text(java.lang.String str,
float x,
float y,
float z)
Same as above but with a z coordinate.
void
text(java.lang.String str,
float x1,
float y1,
float x2,
float y2)
Advanced
void
textAlign(int alignX)
void
textAlign(int alignX,
int alignY)
( begin auto-generated from textAlign.xml ) Sets the current alignment for drawing text.
float
textAscent()
( begin auto-generated from textAscent.xml ) Returns ascent of the current font at its current size.
float
textDescent()
( begin auto-generated from textDescent.xml ) Returns descent of the current font at its current size.
void
textFont(PFont which)
( begin auto-generated from textFont.xml ) Sets the current font that will be drawn with the text() function.
void
textFont(PFont which,
float size)
void
textLeading(float leading)
( begin auto-generated from textLeading.xml ) Sets the spacing between lines of text in units of pixels.
void
textMode(int mode)
( begin auto-generated from textMode.xml ) Sets the way text draws to the screen.
void
textSize(float size)
( begin auto-generated from textSize.xml ) Sets the current font size.
void
texture(PImage image)
( begin auto-generated from texture.xml ) Sets a texture to be applied to vertex points.
void
textureMode(int mode)
( begin auto-generated from textureMode.xml ) Sets the coordinate space for texture mapping.
void
textureWrap(int wrap)
( begin auto-generated from textureWrap.xml ) Description to come...
float
textWidth(char c)
float
textWidth(char[] chars,
int start,
int length)
float
textWidth(java.lang.String str)
( begin auto-generated from textWidth.xml ) Calculates and returns the width of any character or text string.
void
thread(java.lang.String name)
Launch a new thread and call the specified function from that new thread.
void
tint(float gray)
void
tint(float gray,
float alpha)
void
tint(float v1,
float v2,
float v3)
void
tint(float v1,
float v2,
float v3,
float alpha)
void
tint(int rgb)
( begin auto-generated from tint.xml ) Sets the fill value for displaying images.
void
tint(int rgb,
float alpha)
void
translate(float x,
float y)
( begin auto-generated from translate.xml ) Specifies an amount to displace objects within the display window.
void
translate(float x,
float y,
float z)
void
triangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
( begin auto-generated from triangle.xml ) A triangle is a plane created by connecting three points.
static java.lang.String
trim(java.lang.String str)
( begin auto-generated from trim.xml ) Removes whitespace characters from the beginning and end of a String.
static java.lang.String[]
trim(java.lang.String[] array)
static int
unbinary(java.lang.String value)
( begin auto-generated from unbinary.xml ) Converts a String representation of a binary number to its equivalent integer value.
static int
unhex(java.lang.String value)
( begin auto-generated from unhex.xml ) Converts a String representation of a hexadecimal number to its equivalent integer value.
void
unregisterMethod(java.lang.String name,
java.lang.Object target)
void
updatePixels()
( begin auto-generated from updatePixels.xml ) Updates the display window with the data in the pixels[] array.
void
updatePixels(int x1,
int y1,
int x2,
int y2)
static java.lang.String
urlDecode(java.lang.String str)
static java.lang.String
urlEncode(java.lang.String str)
void
vertex(float[] v)
Used by renderer subclasses or PShape to efficiently pass in already formatted vertex information.
void
vertex(float x,
float y)
void
vertex(float x,
float y,
float z)
void
vertex(float x,
float y,
float u,
float v)
void
vertex(float x,
float y,
float z,
float u,
float v)
( begin auto-generated from vertex.xml ) All shapes are constructed by connecting a series of vertices.
static int
year()
( begin auto-generated from year.xml ) Processing communicates with the clock on your computer.