ellipseMode()
Set how the (x, y) and size arguments of ellipse() / circle() / ngon() are interpreted.
CENTER(default):(x, y)is the center;w/h(ord) are the full width/height (diameters).RADIUS:(x, y)is the center;w/h(ord) are radii, so the shape is twice as large as inCENTER.CORNER:(x, y)is the top-left of the bounding box;w/hare its width/height.CORNERS:(x, y)and(w, h)are two opposite corners of the bounding box.
Follows ellipseMode() in p5.js. Resets to CENTER at the start of each fabDraw();
scope a change with push() / pop().
Parameters
| Name | Type | Description |
|---|---|---|
mode | string | CENTER, RADIUS, CORNER, or CORNERS. |
Examples
Syntax
fab.ellipseMode(mode)