Reference changes for 2.0

This commit is contained in:
Casey Reas
2011-09-25 03:56:26 +00:00
parent d15dff5a82
commit b54608d62d
7 changed files with 35 additions and 19 deletions
+15 -6
View File
@@ -10095,10 +10095,10 @@ public class PApplet extends Applet
* ( end auto-generated )
*
* @webref shape:2d_primitives
* @param a x-coordinate of the rectangle
* @param b y-coordinate of the rectangle
* @param c width of the rectangle
* @param d height of the rectangle
* @param a x-coordinate of the rectangle by default
* @param b y-coordinate of the rectangle by default
* @param c width of the rectangle by default
* @param d height of the rectangle by default
* @see PGraphics#rectMode(int)
* @see PGraphics#quad(float, float, float, float, float, float, float, float)
*/
@@ -10108,12 +10108,21 @@ public class PApplet extends Applet
}
/**
* @param r radii for all four corners
*/
public void rect(float a, float b, float c, float d, float r) {
if (recorder != null) recorder.rect(a, b, c, d, r);
g.rect(a, b, c, d, r);
}
/**
* @param tl radius for top-left corner
* @param tr radius for top-right corner
* @param br radius for bottom-right corner
* @param bl radius for bottom-left corner
*/
public void rect(float a, float b, float c, float d,
float tl, float tr, float br, float bl) {
if (recorder != null) recorder.rect(a, b, c, d, tl, tr, br, bl);
@@ -13857,7 +13866,7 @@ public class PApplet extends Applet
* @brief Converts the image to grayscale or black and white
* @usage web_application
* @param kind Either THRESHOLD, GRAY, INVERT, POSTERIZE, BLUR, OPAQUE, ERODE, or DILATE
* @param param in the range from 0 to 1
* @param param unique for each, see above
*/
public void filter(int kind, float param) {
if (recorder != null) recorder.filter(kind, param);
@@ -14065,7 +14074,7 @@ public class PApplet extends Applet
* @param dh destination image height
* @param mode Either BLEND, ADD, SUBTRACT, LIGHTEST, DARKEST, DIFFERENCE, EXCLUSION, MULTIPLY, SCREEN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, DODGE, BURN
*
* @see PGraphics#alpha(int)
* @see PApplet#alpha(int)
* @see PImage#copy(PImage, int, int, int, int, int, int, int, int)
* @see PImage#blendColor(int,int,int)
*/
+13 -5
View File
@@ -1882,10 +1882,10 @@ public class PGraphics extends PImage implements PConstants {
* ( end auto-generated )
*
* @webref shape:2d_primitives
* @param a x-coordinate of the rectangle
* @param b y-coordinate of the rectangle
* @param c width of the rectangle
* @param d height of the rectangle
* @param a x-coordinate of the rectangle by default
* @param b y-coordinate of the rectangle by default
* @param c width of the rectangle by default
* @param d height of the rectangle by default
* @see PGraphics#rectMode(int)
* @see PGraphics#quad(float, float, float, float, float, float, float, float)
*/
@@ -1946,11 +1946,19 @@ public class PGraphics extends PImage implements PConstants {
// bezierVertex(cp1x, cp1y, cp2x, cp2y, x, y);
// }
/**
* @param r radii for all four corners
*/
public void rect(float a, float b, float c, float d, float r) {
rect(a, b, c, d, r, r, r, r);
}
/**
* @param tl radius for top-left corner
* @param tr radius for top-right corner
* @param br radius for bottom-right corner
* @param bl radius for bottom-left corner
*/
public void rect(float a, float b, float c, float d,
float tl, float tr, float br, float bl) {
float hradius, vradius;
+1 -1
View File
@@ -1047,7 +1047,7 @@ public class PImage implements PConstants, Cloneable {
* @brief Converts the image to grayscale or black and white
* @usage web_application
* @param kind Either THRESHOLD, GRAY, INVERT, POSTERIZE, BLUR, OPAQUE, ERODE, or DILATE
* @param param in the range from 0 to 1
* @param param unique for each, see above
*/
public void filter(int kind, float param) {
loadPixels();
@@ -8,8 +8,6 @@
// The next line is needed if running in JavaScript Mode with Processing.js
/* @pjs font="Georgia.ttf"; */
PFont fontA;
void setup() {
size(640, 360);
@@ -2,8 +2,9 @@
* Convolution
* by Daniel Shiffman.
*
* Applies a convolution matrix to a portion of an image.
* Move mouse to apply filter to different parts of the image.
* Applies a convolution matrix to a portion of an image. Move mouse to
* apply filter to different parts of the image. This example is currently
* not accurate in JavaScript mode.
*/
@@ -3,7 +3,7 @@
*
* A high-pass filter sharpens an image. This program analyzes every
* pixel in an image in relation to the neighboring pixels to sharpen
* the image.
* the image. This example is currently not accurate in JavaScript mode.
*/
// The next line is needed if running in JavaScript Mode with Processing.js
@@ -42,7 +42,7 @@ void draw() {
}
// For this pixel in the new image, set the gray value
// based on the sum from the kernel
edgeImg.pixels[y*img.width + x] = color(sum);
edgeImg.pixels[y*img.width + x] = color(sum, sum, sum);
}
}
// State that there are changes to edgeImg.pixels[]
@@ -11,7 +11,7 @@ class Boid {
Boid(PVector l, float ms, float mf) {
acc = new PVector(0,0);
vel = new PVector(random(-1,1),random(-1,1));
vel = new PVector(random(-1,1), random(-1,1));
loc = l.get();
r = 2.0;
maxspeed = ms;