From 554ace347cdb76c8cd9521100c4d9094f13f31fb Mon Sep 17 00:00:00 2001 From: A Pottinger Date: Sun, 6 Oct 2019 17:49:23 -0700 Subject: [PATCH] Revert changes in comments inside PApplet and PGraphics. Related to feedback recieved on https://github.com/processing/processing4/pull/1, revert changes in docstrings possibly caused by reference mismatch. --- core/src/processing/core/PApplet.java | 111 +++++++++++++----------- core/src/processing/core/PGraphics.java | 102 +++++++++++----------- 2 files changed, 114 insertions(+), 99 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 3b1612fe2..51e1bc928 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -281,6 +281,9 @@ public class PApplet implements PConstants { * @see PApplet#get(int, int, int, int) * @see PApplet#set(int, int, int) * @see PImage + * @see PApplet#pixelDensity() + * @see PApplet#pixelWidth + * @see PApplet#pixelHeight */ public int[] pixels; @@ -1214,7 +1217,8 @@ public class PApplet implements PConstants { /** * @webref environment * @param density 1 or 2 - * + * @see PApplet#pixelWidth + * @see PApplet#pixelHeight */ public void pixelDensity(int density) { //println(density + " " + this.pixelDensity); @@ -2004,6 +2008,9 @@ public class PApplet implements PConstants { * @param height height of the display window in units of pixels * @see PApplet#width * @see PApplet#height + * @see PApplet#setup() + * @see PApplet#settings() + * @see PApplet#fullScreen() */ public void size(int width, int height) { // Check to make sure the width/height have actually changed. It's ok to @@ -12166,11 +12173,11 @@ public class PApplet implements PConstants { /** * ( begin auto-generated from square.xml ) * - * Draws a square to the screen. A square is a four-sided shape with - * every angle at ninety degrees and each side is the same length. - * By default, the first two parameters set the location of the - * upper-left corner, the third sets the width and height. The way - * these parameters are interpreted, however, may be changed with the + * Draws a square to the screen. A square is a four-sided shape with + * every angle at ninety degrees and each side is the same length. + * By default, the first two parameters set the location of the + * upper-left corner, the third sets the width and height. The way + * these parameters are interpreted, however, may be changed with the * rectMode() function. * * ( end auto-generated ) @@ -12279,9 +12286,9 @@ public class PApplet implements PConstants { /** * ( begin auto-generated from circle.xml ) * - * Draws a circle to the screen. By default, the first two parameters - * set the location of the center, and the third sets the shape's width - * and height. The origin may be changed with the ellipseMode() + * Draws a circle to the screen. By default, the first two parameters + * set the location of the center, and the third sets the shape's width + * and height. The origin may be changed with the ellipseMode() * function. * * ( end auto-generated ) @@ -12577,17 +12584,17 @@ public class PApplet implements PConstants { * ( begin auto-generated from curvePoint.xml ) * * Evalutes the curve at point t for points a, b, c, d. The parameter t - * varies between 0 and 1, a and d are points on the curve, and b and c are - * the control points. This can be done once with the x coordinates and a + * varies between 0 and 1, a and d are the control points, and b and c are + * the points on the curve. This can be done once with the x coordinates and a * second time with the y coordinates to get the location of a curve at t. * * ( end auto-generated ) * * @webref shape:curves - * @param a coordinate of first point on the curve - * @param b coordinate of second point on the curve - * @param c coordinate of third point on the curve - * @param d coordinate of fourth point on the curve + * @param a coordinate of first control point + * @param b coordinate of first point on the curve + * @param c coordinate of second point on the curve + * @param d coordinate of second control point * @param t value between 0 and 1 * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) * @see PGraphics#curveVertex(float, float) @@ -13323,28 +13330,28 @@ public class PApplet implements PConstants { /** * ( begin auto-generated from push.xml ) * - * The push() function saves the current drawing style - * settings and transformations, while pop() restores these - * settings. Note that these functions are always used together. - * They allow you to change the style and transformation settings - * and later return to what you had. When a new state is started - * with push(), it builds on the current style and transform + * The push() function saves the current drawing style + * settings and transformations, while pop() restores these + * settings. Note that these functions are always used together. + * They allow you to change the style and transformation settings + * and later return to what you had. When a new state is started + * with push(), it builds on the current style and transform * information.
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -13361,28 +13368,28 @@ public class PApplet implements PConstants { /** * ( begin auto-generated from pop.xml ) * - * The pop() function restores the previous drawing style - * settings and transformations after push() has changed them. - * Note that these functions are always used together. They allow - * you to change the style and transformation settings and later - * return to what you had. When a new state is started with push(), + * The pop() function restores the previous drawing style + * settings and transformations after push() has changed them. + * Note that these functions are always used together. They allow + * you to change the style and transformation settings and later + * return to what you had. When a new state is started with push(), * it builds on the current style and transform information.
*
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -14859,6 +14866,8 @@ public class PApplet implements PConstants { /** * gray number specifying value between white and black + * + * @param gray value between black and white, by default 0 to 255 */ public void specular(float gray) { if (recorder != null) recorder.specular(gray); @@ -14924,6 +14933,8 @@ public class PApplet implements PConstants { /** * gray number specifying value between white and black + * + * @param gray value between black and white, by default 0 to 255 */ public void emissive(float gray) { if (recorder != null) recorder.emissive(gray); diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 65bcb280d..0b85780e1 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -2732,11 +2732,11 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from square.xml ) * - * Draws a square to the screen. A square is a four-sided shape with - * every angle at ninety degrees and each side is the same length. - * By default, the first two parameters set the location of the - * upper-left corner, the third sets the width and height. The way - * these parameters are interpreted, however, may be changed with the + * Draws a square to the screen. A square is a four-sided shape with + * every angle at ninety degrees and each side is the same length. + * By default, the first two parameters set the location of the + * upper-left corner, the third sets the width and height. The way + * these parameters are interpreted, however, may be changed with the * rectMode() function. * * ( end auto-generated ) @@ -2931,9 +2931,9 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from circle.xml ) * - * Draws a circle to the screen. By default, the first two parameters - * set the location of the center, and the third sets the shape's width - * and height. The origin may be changed with the ellipseMode() + * Draws a circle to the screen. By default, the first two parameters + * set the location of the center, and the third sets the shape's width + * and height. The origin may be changed with the ellipseMode() * function. * * ( end auto-generated ) @@ -3424,17 +3424,17 @@ public class PGraphics extends PImage implements PConstants { * ( begin auto-generated from curvePoint.xml ) * * Evalutes the curve at point t for points a, b, c, d. The parameter t - * varies between 0 and 1, a and d are points on the curve, and b and c are - * the control points. This can be done once with the x coordinates and a + * varies between 0 and 1, a and d are the control points, and b and c are + * the points on the curve. This can be done once with the x coordinates and a * second time with the y coordinates to get the location of a curve at t. * * ( end auto-generated ) * * @webref shape:curves - * @param a coordinate of first point on the curve - * @param b coordinate of second point on the curve - * @param c coordinate of third point on the curve - * @param d coordinate of fourth point on the curve + * @param a coordinate of first control point + * @param b coordinate of first point on the curve + * @param c coordinate of second point on the curve + * @param d coordinate of second control point * @param t value between 0 and 1 * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) * @see PGraphics#curveVertex(float, float) @@ -5167,28 +5167,28 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from push.xml ) * - * The push() function saves the current drawing style - * settings and transformations, while pop() restores these - * settings. Note that these functions are always used together. - * They allow you to change the style and transformation settings - * and later return to what you had. When a new state is started - * with push(), it builds on the current style and transform + * The push() function saves the current drawing style + * settings and transformations, while pop() restores these + * settings. Note that these functions are always used together. + * They allow you to change the style and transformation settings + * and later return to what you had. When a new state is started + * with push(), it builds on the current style and transform * information.
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -5204,28 +5204,28 @@ public class PGraphics extends PImage implements PConstants { /** * ( begin auto-generated from pop.xml ) * - * The pop() function restores the previous drawing style - * settings and transformations after push() has changed them. - * Note that these functions are always used together. They allow - * you to change the style and transformation settings and later - * return to what you had. When a new state is started with push(), + * The pop() function restores the previous drawing style + * settings and transformations after push() has changed them. + * Note that these functions are always used together. They allow + * you to change the style and transformation settings and later + * return to what you had. When a new state is started with push(), * it builds on the current style and transform information.
*
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -6940,6 +6940,8 @@ public class PGraphics extends PImage implements PConstants { /** * gray number specifying value between white and black + * + * @param gray value between black and white, by default 0 to 255 */ public void specular(float gray) { colorCalc(gray); @@ -7017,6 +7019,8 @@ public class PGraphics extends PImage implements PConstants { /** * gray number specifying value between white and black + * + * @param gray value between black and white, by default 0 to 255 */ public void emissive(float gray) { colorCalc(gray);