1
0
Fork 0
mirror of synced 2024-12-27 00:53:20 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/processing.snippets

706 lines
16 KiB
Text
Raw Normal View History

2012-08-16 23:41:25 -04:00
#BASICS
# doc
snippet doc
/**
* ${1:Description}
*
* @author ${2:name}
* @since ${3:`strftime("%d/%m/%y %H:%M:%S")`}
*/
${0}
2012-08-16 23:41:25 -04:00
# doc comment
snippet docc
/**
* ${1:@private}$0
*/
${0}
2012-08-16 23:41:25 -04:00
# class
snippet class
${1:public }class ${2:`fnamemodify(bufname("%"),":t:r")`} ${3:extends}
{
//--------------------------------------
// CONSTRUCTOR
//--------------------------------------
public $2 (${4:arguments}) {
${0:// expression}
}
}
# package
snippet package
/**
* ${1:Description}
*
* @author ${2:$TM_FULLNAME}
* @since ${3:`strftime("%d/%m/%y %H:%M:%S")`}
*/
package ${0:package};
2012-08-16 23:41:25 -04:00
# function
snippet fun
${1:void/private/protected/public}${2: static} ${3:name}(${4}) {
${5://if not void return null;}
}
${0}
2012-08-16 23:41:25 -04:00
snippet fn
${1:void }${2:name}(${3}) {
${4://if not void return null;}
}
${0}
2012-08-16 23:41:25 -04:00
# constant
snippet const
static final ${1:Object} ${2:VAR_NAM} = ${0};
2012-08-16 23:41:25 -04:00
# var
snippet var
${1:private/public }${2:static }${3:String} ${4:str}${5: =}${0:value};
2012-08-16 23:41:25 -04:00
# var objects
snippet obj
${1:private/public }${2:Object} ${3:o}${4: = new }$2(${0});
2012-08-16 23:41:25 -04:00
#loop for
snippet for
for (int ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) {
${0:$1[$2]}
2012-08-16 23:41:25 -04:00
};
#loop while
snippet wh
2012-08-16 23:41:25 -04:00
while (${1:/* condition */}) {
${0}
2012-08-16 23:41:25 -04:00
}
#break
snippet break
break ${1:label};
#case
snippet case
case ${1:expression} :
${0}
2012-08-16 23:41:25 -04:00
break;
#default
snippet default
default :
${1}
break;
#switch
snippet switch
switch(${1:expression}) {
case '${3:case}':
2013-07-17 19:06:05 -04:00
${4}
2012-08-16 23:41:25 -04:00
break;
${0}
2012-08-16 23:41:25 -04:00
default:
2013-07-17 19:06:05 -04:00
${2}
2012-08-16 23:41:25 -04:00
}
#try
snippet try
try {
2017-02-11 08:01:38 -05:00
${0:${VISUAL}}
2012-08-16 23:41:25 -04:00
} catch(${1:Exception} ${2:e}) {
}
#try catch finally
snippet tryf
try {
2017-02-11 08:01:38 -05:00
${0:${VISUAL}}
2012-08-16 23:41:25 -04:00
} catch(${1:Exception} ${2:e}) {
} finally {
}
#throw
snippet throw
throw new ("${1:Exception()}");
#ternary
snippet ?
? ${1:trueExpression} : ${2:falseExpression}
${0}
2012-08-16 23:41:25 -04:00
snippet if
if (${1:true}) {${0}}
2012-08-16 23:41:25 -04:00
# if ... else
snippet ife
if (${1:true}) {${2}}
else{${0}}
2012-08-16 23:41:25 -04:00
#get
snippet get
public ${1:String} get${2}() {
return ${0:fieldName};
2012-08-16 23:41:25 -04:00
}
#set
snippet set
public void set${1}(${0:String} new${1}) {
2012-08-16 23:41:25 -04:00
${1:fieldName} = new${1};
}
#printIn
snippet println
println("${1:`fnamemodify(bufname("%"),":t:r")`}::${2:method}() "${3: +} ${0});
2012-08-16 23:41:25 -04:00
#println string
snippet pr
println("${0}");
2012-08-16 23:41:25 -04:00
#setup draw
snippet setup
void setup(){
${1}
}
void draw(){
${0}
2012-08-16 23:41:25 -04:00
}
#setup OPENGL
snippet opengl
import processing.opengl.*;
import javax.media.opengl.*;
PGraphicsOpenGL pgl;
GL gl;
void setup(){
size( ${1:300}, ${2:300}, OPENGL );
colorMode( RGB, 1.0 );
hint( ENABLE_OPENGL_4X_SMOOTH );
pgl = (PGraphicsOpenGL) g;
gl = pgl.gl;
gl.setSwapInterval(1);
initGL();
${3}
}
void draw(){
pgl.beginGL();
${4}
pgl.endGL();
getOpenGLErrors();
}
void initGL(){
${0}
2012-08-16 23:41:25 -04:00
}
void getOpenGLErrors(){
int error = gl.glGetError();
switch (error){
case 1280 :
println("GL_INVALID_ENUM - An invalid enumerant was passed to an OpenGL command.");
break;
case 1282 :
println("GL_INVALID_OPERATION - An OpenGL command was issued that was invalid or inappropriate for the current state.");
break;
case 1281 :
println("GL_INVALID_VALUE - A value was passed to OpenGL that was outside the allowed range.");
break;
case 1285 :
println("GL_OUT_OF_MEMORY - OpenGL was unable to allocate enough memory to process a command.");
break;
case 1283 :
println("GL_STACK_OVERFLOW - A command caused an OpenGL stack to overflow.");
break;
case 1284 :
println("GL_STACK_UNDERFLOW - A command caused an OpenGL stack to underflow.");
break;
case 32817 :
println("GL_TABLE_TOO_LARGE");
break;
}
}
#GL Functions
snippet gl begin gl
pgl.beginGL();
${0}
2012-08-16 23:41:25 -04:00
pgl.endGL();
snippet gl gl swap interval
// specify the minimum swap interval for buffer swaps.
gl.setSwapInterval(${0:interval});
2012-08-16 23:41:25 -04:00
snippet gl gl call list
// execute a display list
gl.glCallList(${0:list});
2012-08-16 23:41:25 -04:00
snippet gl gl gen buffers
// import java.nio.IntBuffer;
// import java.nio.FloatBuffer;
// import com.sun.opengl.util.BufferUtil;
// You might need to create four buffers to store vertext data, normal data, texture coordinate data, and indices in vertex arrays
IntBuffer bufferObjects = IntBuffer.allocate(${1:4});
gl.glGenBuffers($1, bufferObjects);
int vertexCount = ${2:3};
int numCoordinates = ${0:3};
2012-08-16 23:41:25 -04:00
// vertexCount * numCoordinates
FloatBuffer vertices = BufferUtil.newFloatBuffer(vertexCount * numCoordinates);
float[] v = {0.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f,
0.0f, 1.0f, 1.0f};
vertices.put(v);
// Bind the first buffer object ID for use with vertext array data
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, bufferObjects.get(0));
gl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount * numCoordinates * BufferUtil.SIZEOF_FLOAT, vertices, GL.GL_STATIC_DRAW);
snippet gl gl bind buffer
${0:// A buffer ID of zero unbinds a buffer object}
2012-08-16 23:41:25 -04:00
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, ${1:0});
snippet gl gl delete buffers
${0:// Parameters are the same for glGenBuffers}
2012-08-16 23:41:25 -04:00
gl.glDeleteBuffers(${1:4}, ${2:bufferObjects});
snippet gl gl depth mask
// enable or disable writing into the depth buffer
gl.glDepthMask(${0:flag});
2012-08-16 23:41:25 -04:00
snippet gl gl load identity
// replaces the top of the active matrix stack with the identity matrix
gl.glLoadIdentity();
snippet gl gl tex coord 2f
// set the current texture coordinates - 2 floats
gl.glTexCoord2f(${1:0.0f}, ${0:0.0f});
2012-08-16 23:41:25 -04:00
snippet gl gl vertex 2f
gl.glVertex2f(${1:0.0f}, ${0:0.0f});
2012-08-16 23:41:25 -04:00
snippet gl gl vertex 3f
gl.glVertex3f(${1:0.0f}, ${2:0.0f}, ${0:0.0f});
2012-08-16 23:41:25 -04:00
snippet gl gl translate f
// multiply the current matrix by a translation matrix
gl.glTranslatef(${1:x}, ${2:y}, ${0:z});
2012-08-16 23:41:25 -04:00
snippet gl gl rotate f
// rotate, x-axis, y-axis, z-axiz
gl.glRotatef(${1:angle}, ${2:x}, ${3:y}, ${0:z});
2012-08-16 23:41:25 -04:00
snippet gl gl scale f
// multiply the current matrix by a general scaling matrix
gl.glScalef(${1:x}, ${2:y}, ${0:z});
2012-08-16 23:41:25 -04:00
snippet gl gl color 4f
gl.glColor4f(${1:red}, ${2:green}, ${3:blue}, ${0:alpha});
2012-08-16 23:41:25 -04:00
snippet gl gl clear color
gl.glClearColor(${1:red}, ${2:green}, ${3:blue}, ${0:alpha});
2012-08-16 23:41:25 -04:00
snippet gl gl color 3f
gl.glColor3f(${1:red}, ${2:green}, ${0:blue});
2012-08-16 23:41:25 -04:00
snippet gl gl push matrix
// spush and pop the current matrix stack
gl.glPushMatrix();
${0}
2012-08-16 23:41:25 -04:00
gl.glPopMatrix();
snippet gl gl gen lists
gl.glGenLists(${0:1})
2012-08-16 23:41:25 -04:00
snippet gl gl flush
// Empties buffers. Call this when all previous issues commands completed
gl.glFlush();
${0}
2012-08-16 23:41:25 -04:00
snippet gl gl get error
println(gl.glGetError());
snippet gl gl clear
gl.glClear(${1:GL.GL_COLOR_BUFFER_BIT}${2: | }${0:GL.GL_DEPTH_BUFFER_BIT});
2012-08-16 23:41:25 -04:00
#frame operations
snippet frameRate
2012-08-16 23:41:25 -04:00
frameRate(${1:30});
${0}
snippet saveFrame
saveFrame("${1:filename-####}${0:.ext}");
2012-08-16 23:41:25 -04:00
#size
snippet size normal
size(${1:200}, ${2:200}${0:, P3D});
snippet size opengl
size(${1:200}, ${2:200}${0:, OPENGL});
2012-08-16 23:41:25 -04:00
#PRIMITIVES
#color
snippet color
color ${1:c}${2: = color(}${3:value1, }${4:value2, }${0:value3)};
2012-08-16 23:41:25 -04:00
#char
snippet char
char ${1:m}${2: = "}${0:char"};
2012-08-16 23:41:25 -04:00
#float
snippet float
float ${1:f}${2: = }${0:0.0f};
2012-08-16 23:41:25 -04:00
#int
snippet int
int ${1:f}${2: = }${0:0};
2012-08-16 23:41:25 -04:00
#boolean
snippet boolean
boolean ${1:b}${2: = }${0:true};
2012-08-16 23:41:25 -04:00
#byte
snippet byte
byte ${1:b}${2: = }${0:127};
2012-08-16 23:41:25 -04:00
#string
snippet string
String ${1:str}${2: = "}${0:CCCP"};
2012-08-16 23:41:25 -04:00
#array
snippet array
${1:int}[] ${2:numbers}${3: = new $1}[${0:length}];
2012-08-16 23:41:25 -04:00
#object
snippet object
${1:Object} ${2:o}${3: = new $1}(${0});
2012-08-16 23:41:25 -04:00
#curve
snippet curve
curve(${1:x1}, ${2:y1}, ${3:x2}, ${4:y2}, ${5:x3}, ${6:y3}, ${7:x4}, ${0:y4});
snippet curve 3D
curve(${1:x1}, ${2:y1}, ${3:z1}, ${4:x2}, ${5:y2}, ${6:z2}, ${7:x3}, ${8:y3}, ${9:z3}, ${10:x4}, ${11:y4}, ${0:z4});
snippet curveDetail
curveDetail(${0:detail});
snippet curvePoint
curvePoint(${1:a}, ${2:b}, ${3:c}, ${4:d}, ${0:t});
snippet curveTightness
curveTightness(${0:squishy});
2012-08-16 23:41:25 -04:00
#bezier
snippet bezier
bezier(${1:x1}, ${2:y1}, ${3:cx1}, ${4:cy1}, ${5:cx2}, ${6:cy2}, ${7:x2}, ${0:y2});
snippet bezier 3D
bezier(${1:x1}, ${2:y1}, ${3:z1}, ${4:cx1}, ${5:cy1}, ${6:cz1}, ${7:cx2}, ${8:cy2}, ${9:cz2}, ${10:x2}, ${11:y2}, ${0:z2});
snippet bezierDetail
bezierDetail(${0:detail});
snippet bezierTangent
bezierTangent(${1:a}, ${2:b}, ${3:c}, ${4:d}, ${0:t});
snippet bezierPoint
bezierPoint(${1:a}, ${2:b}, ${3:c}, ${4:d}, ${0:t});
2012-08-16 23:41:25 -04:00
#vertex
snippet vertex
vertex(${1:x}, ${2:y}${3:, }${4:u}${5:, }${0:v});
snippet vertex 3D
vertex(${1:x}, ${2:y}, ${3:z}${4:, }${5:u}${6:, }${0:v});
snippet bezierVertex
bezierVertex(${1:cx1}, ${2:cy1}, ${3:cx2}, ${4:cy2}, ${5:x}, ${0:y});
snippet bezierVertex 3D
bezierVertex(${1:cx1}, ${2:cy1}, ${3:cz1}, ${4:cx2}, ${5:cy2}, ${6:cz2}, ${7:x}, ${8:y}, ${0:z});
snippet curveVertex
curveVertex(${1:x}, ${0:y});
snippet curveVertex 3D
curveVertex(${1:x}, ${2:y}, ${0:z});
2012-08-16 23:41:25 -04:00
#stroke
snippet stroke
stroke(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha});
snippet strokeWeight
strokeWeight(${0:1});
2012-08-16 23:41:25 -04:00
#mouse
snippet mouseDragged
2012-08-16 23:41:25 -04:00
void mouseDragged(){
${0}
2012-08-16 23:41:25 -04:00
}
snippet mouseMoved
2012-08-16 23:41:25 -04:00
void mouseMoved(){
${0}
2012-08-16 23:41:25 -04:00
}
snippet mouseReleased
2012-08-16 23:41:25 -04:00
void mouseReleased(){
${0}
2012-08-16 23:41:25 -04:00
}
snippet mousePressed
2012-08-16 23:41:25 -04:00
void mousePressed(){
${0}
2012-08-16 23:41:25 -04:00
}
#key
snippet keyReleased
2012-08-16 23:41:25 -04:00
void keyReleased(){
${0}
2012-08-16 23:41:25 -04:00
}
snippet keyTyped
2012-08-16 23:41:25 -04:00
void keyTyped(){
${0}
2012-08-16 23:41:25 -04:00
}
snippet keyPressed
2012-08-16 23:41:25 -04:00
void keyPressed(){
${0}
2012-08-16 23:41:25 -04:00
}
#file
snippet loadStrings
loadStrings("${0:filename}");
snippet saveStrings
saveStrings(${1:filename}, ${0:strings});
snippet loadBytes
loadBytes("${0:filename}");
snippet beginRecord
beginRecord(${1:renderer}, ${0:filename});
snippet saveBytes
saveBytes(${1:filename}, ${0:bytes});
snippet createWriter
createWriter(${0:filename});
snippet createReader
createReader(${0:filename});
2012-08-16 23:41:25 -04:00
#matrix
snippet pushMatrix
2012-08-16 23:41:25 -04:00
pushMatrix();
${0:};
2012-08-16 23:41:25 -04:00
popMatrix();
#text
snippet text data
text(${1:data}, ${2:x}, ${3:y}${4:, }${0:z});
snippet text stringdata
text(${1:stringdata}, ${2:x}, ${3:y}, ${4:width}, ${5:height}${6:, }${0:z});
snippet textSize
textSize(${0:size});
snippet textLeading
textLeading(${0:size});
snippet textWidth
textWidth(${0:data});
snippet font
2012-08-16 23:41:25 -04:00
PFont ${1:font};
$1 = loadFont("${0:FFScala-32.vlw}");
2012-08-16 23:41:25 -04:00
#load font
snippet loadFont
${1:font} = loadFont("${0:FFScala-32.vlw}");
snippet textFont
textFont(${1:font}${2:, }${0:size});
2012-08-16 23:41:25 -04:00
#math
snippet tan
tan(${0:rad});
snippet atan
atan(${0:rad});
snippet atan2
atan2(${0:rad});
snippet sin
sin(${0:rad});
snippet asin
asin(${0:rad});
snippet cos
cos(${0:rad});
snippet acos
acos(${0:rad});
snippet degrees
degrees(${0:rad});
snippet radians
radians(${0:deg});
snippet randomSseed
randomSeed(${0:value});
snippet random
random(${1:value1}${2:, }${0:value2});
snippet pow
pow(${1:num}, ${0:exponent});
snippet floor
floor(${0:value});
snippet sqrt
sqrt(${0:value});
snippet abs
abs(${0:value});
snippet sq
sq(${0:value});
snippet ceil
ceil(${0:value});
snippet exp
exp(${0:value});
snippet round
round(${0:value}};
snippet min
min(${1:value1}, ${2:value2}${3:, }${0:value3});
snippet max
max(${1:value1}, ${2:value2}${3:, }${0:value3});
snippet max array
max(${0:array});
snippet min array
min(${0:array});
snippet log
log(${0:value});
snippet map
map(${1:value}, ${2:low1}, ${4:high1}, ${5:low2}, ${0:high2});
snippet norm
norm(${1:value}, ${2:low}, ${0:high});
snippet constrain
constrain(${1:value}, ${2:min}, ${0:max});
snippet mag
mag(${1:a}, ${2:b}${3:, }${0:c});
snippet dist
dist(${1:x1}, ${2:y1}, ${4:x2}, ${0:y2});
snippet dist 3D
dist(${1:x1}, ${2:y1}, ${3:z1}, ${4:x2}, ${5:y2}, ${0:z2});
2012-08-16 23:41:25 -04:00
#noise math
snippet noise
noise(${1:x}${2:, }${3:y}${4:, }${0:z});
snippet noiseDetail
noiseDetail(${1:octaves}${2:, }${0:falloff});
snippet noiseSeed
noiseSeed(${0:x});
2012-08-16 23:41:25 -04:00
#material
snippet shininess
shininess(${0:shine});
snippet specular
specular(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha});
snippet ambient
ambient(${1:value1}, ${2:value2}, ${0:value3});
snippet emissive
emissive(${1:value1}, ${2:value2}, ${0:value3});
2012-08-16 23:41:25 -04:00
#light
snippet diretionalLight
directionalLight(${1:v1}, ${2:v2}, ${3:v3}, ${4:nx}, ${5:ny}, ${0:nz});
snippet pointLight
pointLight(${1:v1}, ${2:v2}, ${3:v3}, ${4:nx}, ${5:ny}, ${0:nz});
snippet lightFalloff
lightFalloff(${1:constant}, ${2:linear}, ${0:quadratic});
snippet normal
normal(${1:nx}, ${2:ny}, ${0:nz});
snippet lightSpecular
lightSpecular(${1:v1}, ${2:v2}, ${0:v3});
snippet ambientLight
ambientLight(${1:v1}, ${2:v2}, ${3:v3}${7:, ${4:x}, ${5:y}, ${0:z}});
snippet spotLight
spotLight(${1:v1}, ${2:v2}, ${3:v3}, ${4:x}, ${5:y}, ${6:z}, ${7:nx}, ${8:ny}, ${9:nz}, ${10:angle}, ${0:concentration});
2012-08-16 23:41:25 -04:00
#camera
snippet camera
camera(${1:eyeX}, ${2:eyeY}, ${3:eyeZ}, ${4:centerX}, ${5:centerY}, ${6:centerZ}, ${7:upX}, ${8:upY}, ${0:upZ});
snippet ortho
ortho(${1:left}, ${2:right}, ${3:bottom}, ${4:top}, ${5:near}, ${0:far});
snippet perspective
perspective(${1:fov}, ${2:aspect}, ${3:zNear}, ${0:zFar});
snippet frustrum
frustrum(${1:left}, ${2:right}, ${3:bottom}, ${4:top}, ${5:near}, ${0:far});
2012-08-16 23:41:25 -04:00
#transformations
snippet rotate
rotate${1:X}(${0:angle});
snippet translate
translate(${1:x}, ${2:y}${3:, }${0:z});
snippet scale size
scale(${0:size});
snippet scale
scale(${1:x}, ${2:y}${3:, }${0:z});
2012-08-16 23:41:25 -04:00
#coordinates
snippet coord
${1:model/screen}${2:X}(${3:x}, ${4:y}, ${0:z});
2012-08-16 23:41:25 -04:00
#effects
snippet brightness
brightness(${0:color});
snippet lerpColor
lerpColor(${1:c1}, ${2:c2}, ${0:amt});
snippet saturation
saturation(${0:color});
snippet hue
hue(${0:color});
snippet alpha
alpha(${0:color});
snippet tint
tint(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha});
2012-08-16 23:41:25 -04:00
#pixel
snippet set pixel
set(${1:x}, ${2:y}, ${0:color/image});
snippet pixels
pixels[${0:index}]
snippet get pixel
get(${1:x}, ${2:y}${3:, }${4:width}${5:, }${0:height});
2012-08-16 23:41:25 -04:00
#geometric figures
snippet triangle
triangle(${1:x1}, ${2:y1}, ${3:x2}, ${4:y2}, ${5:x3}, ${0:y3});
snippet line
line(${1:x1}, ${2:y1}, ${3:x2}, ${0:y2});
snippet line 3D
line(${1:x1}, ${2:y1}, ${3:z1}, ${4:x2}, ${5:y2}, ${0:z2});
snippet arc
arc(${1:x}, ${2:y}, ${3:width}, ${4:height}, ${5:start}, ${0:stop});
snippet point
point(${1:x}, ${2:y}${3:, }${0:z});
snippet quad
quad(${1:x1}, ${2:y1}, ${3:x2}, ${4:y2}, ${5:x3}, ${6:y3}, ${7:x4}, ${0:y4});
snippet ellipse
ellipse(${1:x}, ${2:y}, ${3:width}, ${0:height});
snippet rect
rect(${1:x}, ${2:y}, ${3:width}, ${0:height});
snippet box
box(${1:width}, ${2:height}, ${0:depth});
snippet sphere
sphere(${0:radius});
snippet sphereDetails
sphereDetail(${0:n});
2012-08-16 23:41:25 -04:00
#array operations
snippet split
split("${1:str}"${2: , }${0:delimiter});
snippet splitTokens
splitTokens(${1:str}${2:, }${0:tokens});
snippet join
join(${1:strgArray}${2: , }${0:seperator});
snippet shorten
shorten(${0:array});
snippet concat
concat(${1:array1}, ${0:array2});
snippet subset
subset(${1:array}, ${0:offset});
snippet append
append(${1:array}, ${0:element});
snippet reverse
reverse(${0:array});
snippet splice
splice(${1:array}, ${2:value/array2}, ${0:index});
snippet sort
sort(${1:dataArray}${2:, }${0:count});
snippet expand
expand(${1:array}${2:, }${0:newSize});
snippet arrayCopy
arrayCopy(${1:src}, ${2:dest}, ${3:, }${0:length});
2012-08-16 23:41:25 -04:00
#string operations
snippet str
str("${0:str}");
snippet match
match(${1:str}, ${0:regexp});
snippet trim
trim(${0:str});
snippet nf
nf(${2:value}, ${3:left}${4:, }${0:right});
snippet nfs
nfs(${2:value}, ${3:left}${4:, }${0:right});
snippet nfp
nfp(${2:value}, ${3:left}${4:, }${0:right});
snippet nfc
nfc(${1:value}${2:, }${0:right});
2012-08-16 23:41:25 -04:00
#convert
snippet unbinary
unbinary("${0:str}"});
snippet hexadecimal
hex(${0:c});
snippet unhex
unhex(${0:c});
snippet binary
binary(${1:value}${2:, }${0:digits});
2012-08-16 23:41:25 -04:00
#image operations
snippet loadImage
loadImage(${0:filename});
snippet image
image(${1:img}, ${2:x}, ${3:y}${4:, }${5:width}${6:, }${0:height});
snippet copy
copy(${1:srcImg}${2:, }${3:x}, ${4:y}, ${5:width}, ${6:height}, ${7:dx}, ${8:dy}, ${9:dwidth}, ${0:dheight});
2012-08-16 23:41:25 -04:00
#containers
snippet bg
background(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha});
2012-08-16 23:41:25 -04:00
snippet pg
PGraphics pg;
pg = createGraphics(${1:width}, ${2:height}${3:, }${0:applet});
2012-08-16 23:41:25 -04:00
snippet pimage
PImage(${1:width}, ${0:height});
2012-08-16 23:41:25 -04:00
#UTILS
#fill
snippet fill
fill(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha});
2012-08-16 23:41:25 -04:00
#red
snippet red
red(${0:color});
2012-08-16 23:41:25 -04:00
#green
snippet green
green(${0:color});
2012-08-16 23:41:25 -04:00
#blue
snippet blue
blue(${0:color});
2012-08-16 23:41:25 -04:00
#status
snippet status
status(${0:text});
2012-08-16 23:41:25 -04:00
#param
snippet param
param(${0:s});
2012-08-16 23:41:25 -04:00
#link
snippet link
link(${1:url}${2:, }${0:target});
2012-08-16 23:41:25 -04:00
#@param
snippet @
@${1:param/return/private/public} ${1:parameter} ${0:description}