Skip to content

Commit bfc1c5d

Browse files
authored
Merge pull request jdf#133 from jeremydouglass/jeremydouglass-patch-circlesquare
reference: add circle() and square()
2 parents 2885d0b + 8c0f998 commit bfc1c5d

2 files changed

Lines changed: 84 additions & 0 deletions

File tree

‎Reference/api_en/circle.xml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<root>
3+
<name>circle()</name>
4+
5+
<category>Shape</category>
6+
7+
<subcategory>2D Primitives</subcategory>
8+
9+
<type></type>
10+
11+
<example>
12+
<image />
13+
<code><![CDATA[
14+
ellipse(56, 46, 55, 55)
15+
]]></code>
16+
</example>
17+
18+
<description><![CDATA[
19+
Draws a circle to the screen. By default, the first two parameters set the location of the center, and the third sets the shape's width and height. The origin may be changed with the <b>ellipseMode()</b> function.
20+
]]></description>
21+
22+
<syntax>
23+
circle(<c>a</c>, <c>b</c>, <c>extent</c>)
24+
</syntax>
25+
26+
<parameter>
27+
<label>a</label>
28+
<description><![CDATA[float: x-coordinate of the circle]]></description>
29+
</parameter>
30+
31+
<parameter>
32+
<label>b</label>
33+
<description><![CDATA[float: y-coordinate of the circle]]></description>
34+
</parameter>
35+
36+
<parameter>
37+
<label>extent</label>
38+
<description><![CDATA[float: width and height of the circle by default]]></description>
39+
</parameter>
40+
41+
<related>ellipse</related>
42+
<related>ellipseMode</related>

‎Reference/api_en/square.xml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<root>
3+
<name>square()</name>
4+
5+
<category>Shape</category>
6+
7+
<subcategory>2D Primitives</subcategory>
8+
9+
<type></type>
10+
11+
<example>
12+
<image />
13+
<code><![CDATA[
14+
square(10, 10, 55)
15+
]]></code>
16+
</example>
17+
18+
<description><![CDATA[
19+
Draws a square to the screen. A square is a four-sided shape with every angle at ninety degrees and each side is the same length. By default, the first two parameters set the location of the upper-left corner, the third sets the width and height. The way these parameters are interpreted, however, may be changed with the <b>rectMode()</b> function.<br />
20+
]]></description>
21+
22+
<syntax>
23+
square(<c>a</c>, <c>b</c>, <c>extent</c>)
24+
</syntax>
25+
26+
<parameter>
27+
<label>a</label>
28+
<description><![CDATA[float: x-coordinate of the square by default]]></description>
29+
</parameter>
30+
31+
<parameter>
32+
<label>b</label>
33+
<description><![CDATA[float: y-coordinate of the square by default]]></description>
34+
</parameter>
35+
36+
<parameter>
37+
<label>extent</label>
38+
<description><![CDATA[float: extent of the square by default]]></description>
39+
</parameter>
40+
41+
<related>rect</related>
42+
<related>rectMode</related>

0 commit comments

Comments
 (0)