mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
76 lines
1.5 KiB
XML
76 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>triangle()</name>
|
|
|
|
<category>Shape</category>
|
|
|
|
<subcategory>2D Primitives</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image>triangle_.gif</image>
|
|
<code>
|
|
triangle(30, 75, 58, 20, 86, 75);
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
A triangle is a plane created by connecting three points. The first two arguments specify the first point, the middle two arguments specify the second point, and the last two arguments specify the third point.
|
|
</description>
|
|
|
|
<syntax>
|
|
triangle(<c>x1</c>, <c>y1</c>, <c>x2</c>, <c>y2</c>, <c>x3</c>, <c>y3</c>);
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>x1</label>
|
|
<description>int or float: x-coordinate of the first point</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>y1</label>
|
|
<description>int or float: y-coordinate of the first point</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>x2</label>
|
|
<description>int or float: x-coordinate of the second point</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>y2</label>
|
|
<description>int or float: y-coordinate of the second point</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>x3</label>
|
|
<description>int or float: x-coordinate of the third point</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>y3</label>
|
|
<description>int or float: y-coordinate of the third point</description>
|
|
</parameter>
|
|
|
|
<returns>None</returns>
|
|
|
|
<related>
|
|
beginShape()
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Function</type>
|
|
|
|
<partof>Core</partof>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|