Files
processing4/web/reference/API/ellipseMode.xml
2005-01-27 06:48:42 +00:00

48 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>ellipseMode()</name>
<category>Shape</category>
<subcategory>2D Primitives</subcategory>
<usage>Web &amp; Application</usage>
<example>
<image>ellipseMode_.gif</image>
<code>
ellipseMode(CENTER);
ellipse(35, 35, 50, 50);
ellipseMode(CORNER);
fill(102);
ellipse(35, 35, 50, 50);
</code>
</example>
<description>
The origin of the ellipse is modified by the <b>ellipseMode()</b> function. The default configuration is <b>ellipseMode(CENTER)</b>, which specifies the location of the ellipse as the center of the shape. The CENTER_RADIUS mode is the same, but the width and height parameters to <b>ellipse()</b> 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 <b>ellipse()</b> to set two opposing corners of the ellipse's bounding box. The parameter must be written in "ALL CAPS" because Processing is a case sensitive language.
</description>
<syntax>
ellipseMode(<c>MODE</c>)
</syntax>
<parameter>
<label>MODE</label>
<description>Either CENTER, CENTER_RADIUS, CORNER, CORNERS.</description>
</parameter>
<returns>None</returns>
<related>
ellipse()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>