mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
67 lines
1.2 KiB
XML
67 lines
1.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>rect()</name>
|
|
|
|
<category>Shape</category>
|
|
|
|
<subcategory>2D Primitives</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image>rect_.gif</image>
|
|
<code>
|
|
rect(30, 20, 55, 55);
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Draws a rectangle to the screen. A rectangle is a four-sided shape with every angle at ninety degrees. The first two parameters set the location, the third sets the width, and the fourth sets the height. The origin is changed with the <b>rectMode()</b> function.
|
|
</description>
|
|
|
|
<syntax>
|
|
rect(<c>x</c>, <c>y</c>, <c>width</c>, <c>height</c>);
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>x</label>
|
|
<description>int or float: x-coordinate of the rectangle</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>y</label>
|
|
<description>int or float: y-coordinate of the rectangle</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>width</label>
|
|
<description>int or float: width of the rectangle</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>height</label>
|
|
<description>int or float: height of the rectangle</description>
|
|
</parameter>
|
|
|
|
<returns>None</returns>
|
|
|
|
<related>
|
|
rectMode()
|
|
quad()
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Function</type>
|
|
|
|
<partof>Core</partof>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|