ellipseMode(mode)
The origin of new ellipses is modified by the ellipseMode()
function. The default configuration is ellipseMode(CENTER)
, which specifies the location of the ellipse as the center of the shape. The RADIUS
mode is the same, but the w
and h
parameters to ellipse()
specify the radius of the ellipse, rather than the diameter. The CORNER
mode draws the shape from the upper-left corner of its bounding box. The CORNERS
mode uses the four parameters to ellipse()
to set two opposing corners of the ellipse’s bounding box.
Type: function
Parameter(s):
- mode {String}:
The ellipse mode to switch to: either
CENTER
,RADIUS
,CORNER
, orCORNERS
.