diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index edf8744c0..26f850ba3 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -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) */ diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 85ddb9462..cb8adc271 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -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; diff --git a/core/src/processing/core/PImage.java b/core/src/processing/core/PImage.java index 68fec1480..fd3e0899b 100644 --- a/core/src/processing/core/PImage.java +++ b/core/src/processing/core/PImage.java @@ -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(); diff --git a/java/examples/Basics/Typography/Words/Words.pde b/java/examples/Basics/Typography/Words/Words.pde index f79f21400..1f3df6a3c 100644 --- a/java/examples/Basics/Typography/Words/Words.pde +++ b/java/examples/Basics/Typography/Words/Words.pde @@ -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); diff --git a/java/examples/Topics/Image Processing/Convolution/Convolution.pde b/java/examples/Topics/Image Processing/Convolution/Convolution.pde index 1fa538107..40660c09f 100644 --- a/java/examples/Topics/Image Processing/Convolution/Convolution.pde +++ b/java/examples/Topics/Image Processing/Convolution/Convolution.pde @@ -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. */ diff --git a/java/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde b/java/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde index c8b35c789..48e2c3dd3 100644 --- a/java/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde +++ b/java/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde @@ -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[] diff --git a/java/examples/Topics/Simulate/Flocking/Boid.pde b/java/examples/Topics/Simulate/Flocking/Boid.pde index 3ff6ef44b..e887c1d3f 100644 --- a/java/examples/Topics/Simulate/Flocking/Boid.pde +++ b/java/examples/Topics/Simulate/Flocking/Boid.pde @@ -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;