From cfb5936bbb76f6d65babb3525dccdbf71aff2ef6 Mon Sep 17 00:00:00 2001 From: REAS Date: Tue, 22 Jan 2019 22:26:40 -0800 Subject: [PATCH] Changes to documentation for circle() and square() --- core/src/processing/core/PGraphics.java | 37 +++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index c05d34c38..4669f138f 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -2729,7 +2729,25 @@ public class PGraphics extends PImage implements PConstants { endShape(CLOSE); } - + /** + * ( 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 + * rectMode() function. + * + * ( end auto-generated ) + * + * @webref shape:2d_primitives + * @param a x-coordinate of the rectangle by default + * @param b y-coordinate of the rectangle by default + * @param c width and height of the rectangle by default + * @see PGraphics#rect(int, int, int, int) + * @see PGraphics#rectMode(int) + */ public void square(float x, float y, float extent) { rect(x, y, extent, extent); } @@ -2910,7 +2928,22 @@ public class PGraphics extends PImage implements PConstants { showMissingWarning("arc"); } - + /** + * ( 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() + * function. + * + * ( end auto-generated ) + * @webref shape:2d_primitives + * @param a x-coordinate of the ellipse + * @param b y-coordinate of the ellipse + * @param c width and height of the ellipse by default + * @see PApplet#ellipse(float, float, float, float) + * @see PApplet#ellipseMode(int) + */ public void circle(float x, float y, float extent) { ellipse(x, y, extent, extent); }